|
|
@ -1,14 +1,16 @@ |
|
|
|
<Styles |
|
|
|
<Styles |
|
|
|
xmlns="https://github.com/avaloniaui" |
|
|
|
xmlns="https://github.com/avaloniaui" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
|
|
|
|
xmlns:avalonia="https://github.com/projektanker/icons.avalonia" |
|
|
|
xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
|
|
|
xmlns:controls="using:StabilityMatrix.Avalonia.Controls" |
|
|
|
|
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
|
|
|
|
|
|
|
xmlns:fluent="clr-namespace:FluentIcons.Avalonia.Fluent;assembly=FluentIcons.Avalonia.Fluent" |
|
|
|
xmlns:inference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference" |
|
|
|
xmlns:inference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference" |
|
|
|
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
|
|
|
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
|
|
|
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
|
|
|
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" |
|
|
|
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" |
|
|
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
|
|
|
|
|
|
|
xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
|
|
|
|
|
|
|
xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
|
|
|
xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
|
|
|
|
|
|
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
|
|
|
x:DataType="inference:ModelCardViewModel"> |
|
|
|
x:DataType="inference:ModelCardViewModel"> |
|
|
|
<Design.PreviewWith> |
|
|
|
<Design.PreviewWith> |
|
|
|
<Panel Width="400" Height="200"> |
|
|
|
<Panel Width="400" Height="200"> |
|
|
@ -19,16 +21,31 @@ |
|
|
|
</Panel> |
|
|
|
</Panel> |
|
|
|
</Design.PreviewWith> |
|
|
|
</Design.PreviewWith> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Styles.Resources> |
|
|
|
|
|
|
|
<fluent:SymbolIconSource |
|
|
|
|
|
|
|
x:Key="IconCube" |
|
|
|
|
|
|
|
IsFilled="False" |
|
|
|
|
|
|
|
Symbol="Cube" /> |
|
|
|
|
|
|
|
<fluent:SymbolIconSource |
|
|
|
|
|
|
|
x:Key="IconQuestionCircle" |
|
|
|
|
|
|
|
IsFilled="True" |
|
|
|
|
|
|
|
Symbol="QuestionCircle" /> |
|
|
|
|
|
|
|
<fluent:SymbolIconSource |
|
|
|
|
|
|
|
x:Key="IconTableCellEdit" |
|
|
|
|
|
|
|
IsFilled="True" |
|
|
|
|
|
|
|
Symbol="TableCellEdit" /> |
|
|
|
|
|
|
|
</Styles.Resources> |
|
|
|
|
|
|
|
|
|
|
|
<Style Selector="controls|ModelCard"> |
|
|
|
<Style Selector="controls|ModelCard"> |
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" /> |
|
|
|
<Setter Property="Template"> |
|
|
|
<Setter Property="Template"> |
|
|
|
<ControlTemplate> |
|
|
|
<ControlTemplate> |
|
|
|
<controls:Card Padding="12"> |
|
|
|
<controls:Card Padding="12"> |
|
|
|
<sg:SpacedGrid |
|
|
|
<sg:SpacedGrid |
|
|
|
ColumnSpacing="8" |
|
|
|
|
|
|
|
RowSpacing="0" |
|
|
|
|
|
|
|
ColumnDefinitions="Auto,*,Auto" |
|
|
|
ColumnDefinitions="Auto,*,Auto" |
|
|
|
RowDefinitions="*,*,*,*"> |
|
|
|
ColumnSpacing="8" |
|
|
|
|
|
|
|
RowDefinitions="*,*,*,*" |
|
|
|
|
|
|
|
RowSpacing="0"> |
|
|
|
<!-- Model --> |
|
|
|
<!-- Model --> |
|
|
|
<TextBlock |
|
|
|
<TextBlock |
|
|
|
Grid.Column="0" |
|
|
|
Grid.Column="0" |
|
|
@ -40,23 +57,37 @@ |
|
|
|
Grid.Row="0" |
|
|
|
Grid.Row="0" |
|
|
|
Grid.Column="1" |
|
|
|
Grid.Column="1" |
|
|
|
Padding="8,6,4,6" |
|
|
|
Padding="8,6,4,6" |
|
|
|
Theme="{StaticResource BetterComboBoxHybridModelTheme}" |
|
|
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
ItemsSource="{Binding ClientManager.Models}" |
|
|
|
ItemsSource="{Binding ClientManager.Models}" |
|
|
|
SelectedItem="{Binding SelectedModel}"/> |
|
|
|
SelectedItem="{Binding SelectedModel}" |
|
|
|
|
|
|
|
Theme="{StaticResource BetterComboBoxHybridModelTheme}" /> |
|
|
|
|
|
|
|
|
|
|
|
<Button |
|
|
|
<Button |
|
|
|
Grid.Row="0" |
|
|
|
Grid.Row="0" |
|
|
|
Grid.Column="2" |
|
|
|
Grid.Column="2" |
|
|
|
VerticalAlignment="Stretch" |
|
|
|
Margin="0,0,0,0" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
Margin="0,0,0,0"> |
|
|
|
VerticalAlignment="Stretch"> |
|
|
|
<ui:SymbolIcon FontSize="16" Symbol="Setting" /> |
|
|
|
<ui:SymbolIcon FontSize="16" Symbol="Setting" /> |
|
|
|
<Button.Flyout> |
|
|
|
<Button.Flyout> |
|
|
|
<ui:FAMenuFlyout Placement="BottomEdgeAlignedLeft"> |
|
|
|
<ui:FAMenuFlyout Placement="BottomEdgeAlignedLeft"> |
|
|
|
<ui:ToggleMenuFlyoutItem IsChecked="{Binding IsRefinerSelectionEnabled}" Text="{x:Static lang:Resources.Label_Refiner}" /> |
|
|
|
<ui:ToggleMenuFlyoutItem |
|
|
|
<ui:ToggleMenuFlyoutItem IsChecked="{Binding IsVaeSelectionEnabled}" Text="{x:Static lang:Resources.Label_VAE}" /> |
|
|
|
IconSource="{StaticResource IconCube}" |
|
|
|
<ui:ToggleMenuFlyoutItem IsChecked="{Binding IsClipSkipEnabled}" Text="{x:Static lang:Resources.Label_CLIPSkip}" /> |
|
|
|
IsChecked="{Binding IsRefinerSelectionEnabled}" |
|
|
|
|
|
|
|
Text="{x:Static lang:Resources.Label_Refiner}" /> |
|
|
|
|
|
|
|
<ui:ToggleMenuFlyoutItem |
|
|
|
|
|
|
|
IconSource="{StaticResource IconCube}" |
|
|
|
|
|
|
|
IsChecked="{Binding IsVaeSelectionEnabled}" |
|
|
|
|
|
|
|
Text="{x:Static lang:Resources.Label_VAE}" /> |
|
|
|
|
|
|
|
<ui:ToggleMenuFlyoutItem |
|
|
|
|
|
|
|
IconSource="{StaticResource IconTableCellEdit}" |
|
|
|
|
|
|
|
IsChecked="{Binding IsClipSkipEnabled}" |
|
|
|
|
|
|
|
Text="{x:Static lang:Resources.Label_CLIPSkip}" /> |
|
|
|
|
|
|
|
<ui:MenuFlyoutSeparator /> |
|
|
|
|
|
|
|
<ui:MenuFlyoutItem |
|
|
|
|
|
|
|
Command="{Binding ConfigClickCommand}" |
|
|
|
|
|
|
|
IconSource="{StaticResource IconQuestionCircle}" |
|
|
|
|
|
|
|
Text="{x:Static lang:Resources.Label_Config}" /> |
|
|
|
</ui:FAMenuFlyout> |
|
|
|
</ui:FAMenuFlyout> |
|
|
|
</Button.Flyout> |
|
|
|
</Button.Flyout> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
@ -77,11 +108,11 @@ |
|
|
|
Grid.ColumnSpan="2" |
|
|
|
Grid.ColumnSpan="2" |
|
|
|
Margin="0,8,0,0" |
|
|
|
Margin="0,8,0,0" |
|
|
|
Padding="8,6,4,6" |
|
|
|
Padding="8,6,4,6" |
|
|
|
IsVisible="{Binding IsRefinerSelectionEnabled}" |
|
|
|
|
|
|
|
Theme="{StaticResource BetterComboBoxHybridModelTheme}" |
|
|
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
|
|
IsVisible="{Binding IsRefinerSelectionEnabled}" |
|
|
|
ItemsSource="{Binding ClientManager.Models}" |
|
|
|
ItemsSource="{Binding ClientManager.Models}" |
|
|
|
SelectedItem="{Binding SelectedRefiner}"/> |
|
|
|
SelectedItem="{Binding SelectedRefiner}" |
|
|
|
|
|
|
|
Theme="{StaticResource BetterComboBoxHybridModelTheme}" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- VAE --> |
|
|
|
<!-- VAE --> |
|
|
|
<TextBlock |
|
|
|
<TextBlock |
|
|
@ -119,16 +150,16 @@ |
|
|
|
Grid.Row="3" |
|
|
|
Grid.Row="3" |
|
|
|
Grid.Column="1" |
|
|
|
Grid.Column="1" |
|
|
|
Grid.ColumnSpan="2" |
|
|
|
Grid.ColumnSpan="2" |
|
|
|
IsVisible="{Binding IsClipSkipEnabled}" |
|
|
|
|
|
|
|
Watermark="1" |
|
|
|
|
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
|
|
|
|
Margin="0,8,0,0" |
|
|
|
Margin="0,8,0,0" |
|
|
|
Minimum="1" |
|
|
|
HorizontalAlignment="Stretch" |
|
|
|
Maximum="24" |
|
|
|
ClipValueToMinMax="True" |
|
|
|
Increment="1" |
|
|
|
Increment="1" |
|
|
|
|
|
|
|
IsVisible="{Binding IsClipSkipEnabled}" |
|
|
|
|
|
|
|
Maximum="24" |
|
|
|
|
|
|
|
Minimum="1" |
|
|
|
ParsingNumberStyle="Integer" |
|
|
|
ParsingNumberStyle="Integer" |
|
|
|
Value="{Binding ClipSkip, Converter={x:Static converters:NullableDefaultNumericConverters.IntToDecimal}}" |
|
|
|
Watermark="1" |
|
|
|
ClipValueToMinMax="True"/> |
|
|
|
Value="{Binding ClipSkip, Converter={x:Static converters:NullableDefaultNumericConverters.IntToDecimal}}" /> |
|
|
|
|
|
|
|
|
|
|
|
</sg:SpacedGrid> |
|
|
|
</sg:SpacedGrid> |
|
|
|
</controls:Card> |
|
|
|
</controls:Card> |
|
|
|