You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
184 lines
9.7 KiB
184 lines
9.7 KiB
1 year ago
|
<Styles
|
||
|
xmlns="https://github.com/avaloniaui"
|
||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
xmlns:controls="using:StabilityMatrix.Avalonia.Controls"
|
||
12 months ago
|
xmlns:fluentIcons="clr-namespace:FluentIcons.FluentAvalonia;assembly=FluentIcons.FluentAvalonia"
|
||
|
xmlns:input="clr-namespace:FluentAvalonia.UI.Input;assembly=FluentAvalonia"
|
||
1 year ago
|
xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages"
|
||
|
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"
|
||
|
xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core"
|
||
|
xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia"
|
||
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||
|
xmlns:vmInference="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Inference"
|
||
12 months ago
|
xmlns:markupExtensions="clr-namespace:StabilityMatrix.Avalonia.MarkupExtensions"
|
||
1 year ago
|
x:DataType="vmInference:ControlNetCardViewModel">
|
||
1 year ago
|
<Design.PreviewWith>
|
||
12 months ago
|
<StackPanel Width="400" Height="500">
|
||
1 year ago
|
<controls:ControlNetCard DataContext="{x:Static mocks:DesignData.ControlNetCardViewModel}" />
|
||
1 year ago
|
</StackPanel>
|
||
|
</Design.PreviewWith>
|
||
|
|
||
12 months ago
|
<Styles.Resources>
|
||
|
<ToolTip x:Key="WipFeatureToolTip">
|
||
|
<StackPanel>
|
||
|
<TextBlock Text="{x:Static lang:Resources.Label_WipFeature}" Theme="{DynamicResource BodyStrongTextBlockStyle}" />
|
||
|
<TextBlock Foreground="{DynamicResource TextFillColorTertiaryBrush}" Text="{x:Static lang:Resources.Label_WipFeatureDescription}" />
|
||
|
</StackPanel>
|
||
|
</ToolTip>
|
||
|
</Styles.Resources>
|
||
|
|
||
1 year ago
|
<Style Selector="controls|ControlNetCard">
|
||
1 year ago
|
<!-- Set Defaults -->
|
||
1 year ago
|
<Setter Property="Template">
|
||
|
<ControlTemplate>
|
||
|
<controls:Card Padding="12">
|
||
12 months ago
|
<StackPanel Spacing="6">
|
||
|
<sg:SpacedGrid
|
||
|
ColumnDefinitions="0.34*,0.65*"
|
||
|
ColumnSpacing="8"
|
||
|
RowDefinitions="Auto,Auto,Auto"
|
||
|
RowSpacing="4">
|
||
1 year ago
|
|
||
12 months ago
|
<!-- Image Select -->
|
||
|
<controls:SelectImageCard
|
||
|
Grid.RowSpan="2"
|
||
|
Padding="6"
|
||
|
VerticalAlignment="Stretch"
|
||
|
DataContext="{Binding SelectImageCardViewModel}"
|
||
|
FontSize="13" />
|
||
1 year ago
|
|
||
12 months ago
|
<!-- TODO: Preprocessor Model -->
|
||
|
<ui:FAComboBox
|
||
|
Grid.Row="0"
|
||
|
Grid.Column="1"
|
||
|
Margin="0,0,0,4"
|
||
|
HorizontalAlignment="Stretch"
|
||
12 months ago
|
markupExtensions:ShowDisabledTooltipExtension.ShowOnDisabled="True"
|
||
12 months ago
|
Header="{x:Static lang:Resources.Label_Preprocessor}"
|
||
|
IsEnabled="False"
|
||
|
Theme="{StaticResource FAComboBoxHybridModelTheme}"
|
||
|
ToolTip.ShowDelay="1200"
|
||
|
ToolTip.Tip="{StaticResource WipFeatureToolTip}" />
|
||
1 year ago
|
|
||
12 months ago
|
<!-- ControlNet Model -->
|
||
|
<ui:FAComboBox
|
||
|
x:Name="PART_ModelComboBox"
|
||
|
Grid.Row="1"
|
||
|
Grid.Column="1"
|
||
|
HorizontalAlignment="Stretch"
|
||
|
Header="{x:Static lang:Resources.Label_Model}"
|
||
|
ItemContainerTheme="{StaticResource FAComboBoxItemHybridModelTheme}"
|
||
|
ItemsSource="{Binding ClientManager.ControlNetModels}"
|
||
|
SelectedItem="{Binding SelectedModel}">
|
||
|
|
||
|
<ui:FAComboBox.Resources>
|
||
|
<input:StandardUICommand x:Key="RemoteDownloadCommand" Command="{Binding RemoteDownloadCommand}" />
|
||
1 year ago
|
</ui:FAComboBox.Resources>
|
||
12 months ago
|
|
||
1 year ago
|
<ui:FAComboBox.DataTemplates>
|
||
|
<controls:HybridModelTemplateSelector>
|
||
12 months ago
|
<DataTemplate x:Key="{x:Static models:HybridModelType.Downloadable}" DataType="models:HybridModelFile">
|
||
1 year ago
|
<Grid ColumnDefinitions="*,Auto">
|
||
12 months ago
|
<TextBlock Foreground="{DynamicResource ThemeGreyColor}" Text="{Binding ShortDisplayName}" />
|
||
|
<Button
|
||
|
Grid.Column="1"
|
||
1 year ago
|
Margin="8,0,0,0"
|
||
12 months ago
|
Padding="0"
|
||
|
Classes="transparent-full">
|
||
1 year ago
|
<fluentIcons:SymbolIcon
|
||
|
VerticalAlignment="Center"
|
||
|
FontSize="18"
|
||
|
Foreground="{DynamicResource ThemeGreyColor}"
|
||
|
IsFilled="True"
|
||
|
Symbol="CloudArrowDown" />
|
||
|
</Button>
|
||
|
</Grid>
|
||
|
</DataTemplate>
|
||
12 months ago
|
<DataTemplate x:Key="{x:Static models:HybridModelType.None}" DataType="models:HybridModelFile">
|
||
|
<TextBlock Text="{Binding ShortDisplayName}" />
|
||
1 year ago
|
</DataTemplate>
|
||
|
</controls:HybridModelTemplateSelector>
|
||
|
</ui:FAComboBox.DataTemplates>
|
||
1 year ago
|
|
||
12 months ago
|
</ui:FAComboBox>
|
||
|
|
||
|
</sg:SpacedGrid>
|
||
1 year ago
|
<sg:SpacedGrid
|
||
|
ColumnDefinitions="*,Auto,Auto"
|
||
12 months ago
|
RowDefinitions="Auto,Auto,Auto,Auto"
|
||
|
RowSpacing="0">
|
||
1 year ago
|
<!-- Strength -->
|
||
12 months ago
|
<TextBlock
|
||
1 year ago
|
VerticalAlignment="Center"
|
||
12 months ago
|
Text="{x:Static lang:Resources.Label_ControlWeight}"
|
||
1 year ago
|
TextAlignment="Left" />
|
||
1 year ago
|
<ui:NumberBox
|
||
|
Grid.Row="0"
|
||
|
Grid.Column="1"
|
||
|
Grid.ColumnSpan="2"
|
||
|
HorizontalAlignment="Stretch"
|
||
|
Maximum="10"
|
||
|
Minimum="0"
|
||
|
SimpleNumberFormat="F2"
|
||
12 months ago
|
SmallChange="0.01"
|
||
|
SpinButtonPlacementMode="Inline"
|
||
1 year ago
|
Value="{Binding Strength}" />
|
||
1 year ago
|
<Slider
|
||
1 year ago
|
Grid.Row="1"
|
||
|
Grid.Column="0"
|
||
|
Grid.ColumnSpan="3"
|
||
1 year ago
|
Margin="0,-8,0,0"
|
||
12 months ago
|
IsSnapToTickEnabled="True"
|
||
1 year ago
|
Maximum="1"
|
||
|
Minimum="0"
|
||
|
SmallChange="0.01"
|
||
12 months ago
|
TickFrequency="0.01"
|
||
1 year ago
|
Value="{Binding Strength}" />
|
||
|
|
||
|
<!-- Start end percent -->
|
||
12 months ago
|
<TextBlock
|
||
1 year ago
|
Grid.Row="2"
|
||
|
Grid.Column="0"
|
||
|
VerticalAlignment="Center"
|
||
12 months ago
|
Text="{x:Static lang:Resources.Label_ControlSteps}"
|
||
1 year ago
|
TextAlignment="Left" />
|
||
12 months ago
|
|
||
1 year ago
|
<ui:NumberBox
|
||
|
Grid.Row="2"
|
||
|
Grid.Column="1"
|
||
|
HorizontalAlignment="Stretch"
|
||
|
Maximum="10"
|
||
1 year ago
|
Minimum="0"
|
||
12 months ago
|
SimpleNumberFormat="P0"
|
||
1 year ago
|
SmallChange="0.01"
|
||
|
Value="{Binding StartPercent}" />
|
||
|
<ui:NumberBox
|
||
|
Grid.Row="2"
|
||
|
Grid.Column="2"
|
||
|
HorizontalAlignment="Stretch"
|
||
|
Maximum="10"
|
||
|
Minimum="0"
|
||
12 months ago
|
SimpleNumberFormat="P0"
|
||
1 year ago
|
SmallChange="0.01"
|
||
|
Value="{Binding EndPercent}" />
|
||
|
|
||
|
<ui:RangeSlider
|
||
|
Grid.Row="3"
|
||
|
Grid.Column="0"
|
||
|
Grid.ColumnSpan="3"
|
||
1 year ago
|
Margin="0,4,0,0"
|
||
1 year ago
|
Maximum="1"
|
||
|
Minimum="0"
|
||
|
RangeEnd="{Binding EndPercent}"
|
||
|
RangeStart="{Binding StartPercent}"
|
||
12 months ago
|
ShowValueToolTip="False"
|
||
1 year ago
|
StepFrequency="0.01"
|
||
1 year ago
|
ToolTipStringFormat="P" />
|
||
|
</sg:SpacedGrid>
|
||
12 months ago
|
</StackPanel>
|
||
1 year ago
|
</controls:Card>
|
||
|
</ControlTemplate>
|
||
|
</Setter>
|
||
|
</Style>
|
||
|
</Styles>
|