Skip to content

Commit

Permalink
fix imageviewer
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Jul 23, 2024
1 parent 1076846 commit 9df0e84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/OneWare.Essentials/Models/PackageModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task<bool> UpdateAsync(PackageVersion version)
protected virtual PackageTarget? SelectTarget(PackageVersion version)
{
var currentTarget = PlatformHelper.Platform.ToString().ToLower();
var target = version.Targets?.FirstOrDefault(x => x.Target?.Replace("-", "") == currentTarget);
var target = version.Targets?.FirstOrDefault(x => x.Target?.Replace("-", "") == currentTarget) ?? version.Targets?.FirstOrDefault(x => x.Target == "all");
return target;
}

Expand Down
2 changes: 1 addition & 1 deletion src/OneWare.ImageViewer/ViewModels/ImageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected override void UpdateCurrentFile(IFile? oldFile)
switch (CurrentFile.Extension.ToLower())
{
case ".svg":
var svg = new SvgSource(new Uri(FullPath));
var svg = SvgSource.Load(FullPath);
Image = new SvgImage
{
Source = svg
Expand Down
6 changes: 3 additions & 3 deletions src/OneWare.PackageManager/Views/PackageManagerView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
IsVisible="{Binding IconObservable, Converter={x:Static ObjectConverters.IsNotNull}}"
VerticalAlignment="Center" Width="18"
Source="{Binding IconObservable^, FallbackValue={x:Null}}" />
<TextBlock Grid.Column="1" Margin="7 0" FontSize="13" Text="{Binding Header}" />
<TextBlock Grid.Column="1" Margin="7 0" FontSize="13" Text="{Binding Header}" TextTrimming="CharacterEllipsis" />
<TextBlock Grid.Column="2" Margin="3 0" HorizontalAlignment="Right"
TextAlignment="Center" Text="{Binding VisiblePackages.Count}"
Foreground="{DynamicResource ThemeBorderHighBrush}" />
Expand Down Expand Up @@ -111,13 +111,13 @@
<Grid DockPanel.Dock="Right" RowDefinitions="25, 25" Margin="10, 5, 0, 5"
ColumnDefinitions="*, Auto">
<TextBlock Grid.Column="0" Grid.Row="0" FontSize="15" FontWeight="Bold"
VerticalAlignment="Center"
VerticalAlignment="Center" TextTrimming="CharacterEllipsis"
Text="{Binding PackageModel.Package.Name}" />
<TextBlock Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
VerticalAlignment="Center"
Text="{Binding PackageModel.Package.Description}"
TextWrapping="Wrap" />
<StackPanel Grid.Row="0" Grid.Column="1" Spacing="10" Orientation="Horizontal">
<StackPanel Grid.Row="0" Grid.Column="1" Spacing="10" Orientation="Horizontal" Margin="2 0 0 0">
<Image Source="{DynamicResource VsImageLib.StatusWarning16X}"
Height="12"
IsVisible="{Binding PackageModel.WarningText, Converter={x:Static ObjectConverters.IsNotNull}}"
Expand Down

0 comments on commit 9df0e84

Please sign in to comment.