Browse Source

Merge pull request #601 from ionite34/fix-images

fix missing images on macos & linux
pull/629/head
JT 7 months ago committed by GitHub
parent
commit
708743df47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 5
      StabilityMatrix.Avalonia/Controls/Inference/ImageFolderCard.axaml
  3. 5
      StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml
  4. 8
      StabilityMatrix.Avalonia/Views/OutputsPage.axaml

1
CHANGELOG.md

@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
### Fixed
- Fixed package launch not working when environment variable `SETUPTOOLS_USE_DISTUTILS` is set due to conflict with a default environment variable. User environment variables will now correctly override any default environment variables.
- Fixed "No refresh token found" error when failing to login with Lykos account in some cases.
- Fixed [#574](https://github.com/LykosAI/StabilityMatrix/issues/574) - local images not showing on macOS or Linux
## v2.10.0
### Added

5
StabilityMatrix.Avalonia/Controls/Inference/ImageFolderCard.axaml

@ -11,6 +11,7 @@
xmlns:scroll="clr-namespace:StabilityMatrix.Avalonia.Controls.Scroll"
xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls"
xmlns:vendorLabs="clr-namespace:StabilityMatrix.Avalonia.Controls.VendorLabs"
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters"
x:DataType="vmInference:ImageFolderCardViewModel">
<Design.PreviewWith>
@ -20,6 +21,8 @@
</Grid>
</Panel>
</Design.PreviewWith>
<converters:FileUriConverter x:Key="FileUriConverter" />
<ControlTheme x:Key="{x:Type controls:ImageFolderCard}" TargetType="controls:ImageFolderCard">
<Setter Property="Background" Value="Transparent" />
@ -200,7 +203,7 @@
<vendorLabs:BetterAsyncImage
Width="{Binding $parent[ItemsRepeater].((vmInference:ImageFolderCardViewModel)DataContext).ImageSize.Width}"
Height="{Binding $parent[ItemsRepeater].((vmInference:ImageFolderCardViewModel)DataContext).ImageSize.Height}"
Source="{Binding AbsolutePath}"
Source="{Binding AbsolutePath, Converter={StaticResource FileUriConverter}}"
Stretch="UniformToFill" />
<Border

5
StabilityMatrix.Avalonia/Views/CheckpointsPage.axaml

@ -31,6 +31,7 @@
x:Key="TextDropShadowEffect" />
<converters:EnumStringConverter x:Key="EnumStringConverter" />
<converters:FileUriConverter x:Key="FileUriConverter"/>
<!-- Template for a single badge -->
<DataTemplate DataType="{x:Type system:String}" x:Key="BadgeTemplate">
@ -143,7 +144,7 @@
<vendorLabs:BetterAsyncImage
Margin="0,0,0,4"
CornerRadius="4"
Source="{Binding PreviewImagePath}"
Source="{Binding PreviewImagePath, Converter={StaticResource FileUriConverter}}"
Stretch="Uniform"
IsVisible="{Binding IsConnectedModel}" />
<TextBlock
@ -182,7 +183,7 @@
Grid.ColumnSpan="2"
Margin="0, 4,0,4"
CornerRadius="8"
Source="{Binding PreviewImagePath}"
Source="{Binding PreviewImagePath, Converter={StaticResource FileUriConverter}}"
ClipToBounds="True"
Stretch="UniformToFill"
Height="300"

8
StabilityMatrix.Avalonia/Views/OutputsPage.axaml

@ -13,6 +13,7 @@
xmlns:selectableImageCard="clr-namespace:StabilityMatrix.Avalonia.Controls.SelectableImageCard"
xmlns:ui="using:FluentAvalonia.UI.Controls"
xmlns:vm="clr-namespace:StabilityMatrix.Avalonia.ViewModels"
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters"
d:DataContext="{x:Static mocks:DesignData.OutputsPageViewModel}"
d:DesignHeight="650"
d:DesignWidth="800"
@ -20,6 +21,11 @@
x:DataType="vm:OutputsPageViewModel"
Focusable="True"
mc:Ignorable="d">
<controls:UserControlBase.Resources>
<converters:FileUriConverter x:Key="FileUriConverter" />
</controls:UserControlBase.Resources>
<Grid Margin="16" RowDefinitions="Auto,*"
ColumnDefinitions="Auto, *">
@ -177,7 +183,7 @@
ImageHeight="{Binding $parent[ItemsRepeater].((vm:OutputsPageViewModel)DataContext).ImageSize.Height}"
ImageWidth="{Binding $parent[ItemsRepeater].((vm:OutputsPageViewModel)DataContext).ImageSize.Width}"
IsSelected="{Binding IsSelected}"
Source="{Binding ImageFile.AbsolutePath}">
Source="{Binding ImageFile.AbsolutePath, Converter={StaticResource FileUriConverter}}">
<selectableImageCard:SelectableImageButton.ContextFlyout>
<ui:FAMenuFlyout>
<ui:MenuFlyoutItem

Loading…
Cancel
Save