mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
103 lines
4.8 KiB
XML
103 lines
4.8 KiB
XML
<Styles xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
|
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia">
|
|
<!-- Preview -->
|
|
<Design.PreviewWith>
|
|
<Border Padding="20">
|
|
<StackPanel>
|
|
<TextBlock Margin="0 5 0 0">Button.icon-button</TextBlock>
|
|
<Button Classes="icon-button">
|
|
<avalonia:MaterialIcon Kind="Cog" />
|
|
</Button>
|
|
<Button Classes="icon-button" IsEnabled="False">
|
|
<avalonia:MaterialIcon Kind="Cog" />
|
|
</Button>
|
|
|
|
<TextBlock Margin="0 5 0 0">Button.icon-button icon-button-small</TextBlock>
|
|
<Button Classes="icon-button icon-button-small">
|
|
<avalonia:MaterialIcon Kind="Cog" />
|
|
</Button>
|
|
|
|
<TextBlock Margin="0 5 0 0">ToggleButton.icon-button</TextBlock>
|
|
<ToggleButton Classes="icon-button">
|
|
<avalonia:MaterialIcon Kind="Cog" />
|
|
</ToggleButton>
|
|
|
|
<TextBlock Margin="0 5 0 0">HyperlinkButton.icon-button</TextBlock>
|
|
<controls:HyperlinkButton Classes="icon-button">
|
|
<avalonia:MaterialIcon Kind="Web" />
|
|
</controls:HyperlinkButton>
|
|
|
|
<TextBlock Margin="0 5 0 0">HyperlinkButton.icon-button icon-button-small</TextBlock>
|
|
<controls:HyperlinkButton Classes="icon-button icon-button-small">
|
|
<avalonia:MaterialIcon Kind="Web" />
|
|
</controls:HyperlinkButton>
|
|
|
|
|
|
<TextBlock Margin="0 5 0 0">Button.window-button</TextBlock>
|
|
<Button Classes="title-bar-button">
|
|
<avalonia:MaterialIcon Kind="WindowMinimize" />
|
|
</Button>
|
|
</StackPanel>
|
|
</Border>
|
|
</Design.PreviewWith>
|
|
|
|
<!-- Styles -->
|
|
<Style Selector=":is(Button).icon-button">
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Padding" Value="5.5" />
|
|
</Style>
|
|
<Style Selector=":is(Button).icon-button:pointerover /template/ Border#BorderElement">
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Style>
|
|
<Style Selector=":is(Button).icon-button:disabled /template/ Border#BorderElement">
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Style>
|
|
<Style Selector=":is(Button).icon-button[IsEnabled=False] /template/ Border#BorderElement">
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Style>
|
|
|
|
<Style Selector=":is(Button).icon-button:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundPointerOver}" />
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundPointerOver}" />
|
|
</Style>
|
|
<Style Selector=":is(Button).icon-button:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundPressed}" />
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundPressed}" />
|
|
</Style>
|
|
<Style Selector=":is(Button).icon-button:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource AppBarButtonBackgroundDisabled}" />
|
|
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AppBarButtonForegroundDisabled}" />
|
|
</Style>
|
|
|
|
<Style Selector=":is(Button).icon-button-small">
|
|
<Setter Property="Padding" Value="4" />
|
|
</Style>
|
|
<Style Selector=":is(Button).icon-button-small avalonia|MaterialIcon">
|
|
<Setter Property="Width" Value="14" />
|
|
<Setter Property="Height" Value="14" />
|
|
</Style>
|
|
|
|
<Style Selector=":is(Button).icon-button-large avalonia|MaterialIcon">
|
|
<Setter Property="Width" Value="20" />
|
|
<Setter Property="Height" Value="20" />
|
|
</Style>
|
|
|
|
<Style Selector="controls|HyperlinkButton.icon-button">
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
|
</Style>
|
|
|
|
<Style Selector="Button.title-bar-button">
|
|
<Setter Property="Width" Value="46"></Setter>
|
|
<Setter Property="Height" Value="30"></Setter>
|
|
<Setter Property="BorderThickness" Value="0"></Setter>
|
|
<Setter Property="CornerRadius" Value="0"></Setter>
|
|
<Setter Property="Margin" Value="0"></Setter>
|
|
<Setter Property="Background" Value="Transparent"></Setter>
|
|
</Style>
|
|
<Style Selector="Button.title-bar-button:pointerover">
|
|
<Setter Property="Background" Value="Red"></Setter>
|
|
</Style>
|
|
</Styles> |