Multi-Platform Package Manager for Stable Diffusion
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.

128 lines
6.2 KiB

1 year ago
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls">
<Design.PreviewWith>
<Border Padding="20">
1 year ago
<StackPanel>
<controls:Card
Margin="8"
MaxHeight="450"
Name="ModelCard"
Width="330">
<TextBlock Text="Normal Card" />
</controls:Card>
<controls:Card
Margin="8"
MaxHeight="450"
Classes="success"
Width="330">
<TextBlock Text="Success Card" />
</controls:Card>
<controls:Card
Margin="8"
MaxHeight="450"
Classes="info"
Width="330">
<TextBlock Text="Info Card" />
1 year ago
</controls:Card>
<controls:Card
Margin="8"
MaxHeight="450"
Classes="disabled"
Width="330">
<TextBlock Text="Disabled Card (by classes)" />
</controls:Card>
<controls:Card
Margin="8"
MaxHeight="450"
IsCardVisualsEnabled="False"
Width="330">
<TextBlock Text="Disabled Card (by property)" />
</controls:Card>
1 year ago
</StackPanel>
</Border>
</Design.PreviewWith>
1 year ago
<ControlTheme x:Key="{x:Type controls:Card}" TargetType="controls:Card">
<Setter Property="Background" Value="{DynamicResource ComboBoxBackground}"/>
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrush}" />
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForeground}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="14,16,14,16" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<Border
x:Name="ContentBorder"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding Border.CornerRadius}">
<ContentPresenter
x:Name="ContentPresenter"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
1 year ago
Content="{TemplateBinding Content}" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Styles>
<!-- Success -->
<Style Selector="controls|Card.success">
<Setter Property="Background" Value="{DynamicResource ThemeGreenColorTransparent}" />
<Setter Property="BorderBrush" Value="{DynamicResource ThemeGreenColorTransparent}" />
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
</Style>
</Style>
<!-- Info -->
<Style Selector="controls|Card.info">
<Setter Property="Background" Value="{DynamicResource ThemeDarkBlueColorTransparent}" />
<Setter Property="BorderBrush" Value="{DynamicResource ThemeDarkBlueColorTransparent}" />
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
</Style>
</Style>
<!-- Transparent -->
<Style Selector="controls|Card.transparent">
<Setter Property="Background" Value="{DynamicResource ThemeControlTransparentBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ThemeControlTransparentBrush}" />
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
</Style>
</Style>
<!-- Disabled -->
<Style Selector="controls|Card.disabled">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Padding" Value="0" />
<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="Transparent" />
</Style>
</Style>
</Styles>
1 year ago
</ControlTheme>
</ResourceDictionary>