emo-client/Saradomin/Resources/Styles/NumericUpDown.axaml

92 lines
4.3 KiB
XML

<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style Selector="NumericUpDown.NormalNumericUpDown">
<Setter Property="Width" Value="53" />
<Setter Property="BorderBrush" Value="{StaticResource DarkBorderBrush}" />
<Setter Property="Background" Value="{StaticResource DarkMediumBackgroundBrush}" />
<Setter Property="Foreground" Value="{StaticResource AccentBrush}" />
<Setter Property="CornerRadius" Value="2" />
<Setter Property="Padding" Value="1" />
<Setter Property="ClipValueToMinMax" Value="True" />
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ TextBox#PART_TextBox /template/ ScrollViewer#PART_ScrollViewer /template/ ScrollBar">
<Setter Property="Visibility" Value="Hidden" />
</Style>
<!-- https://github.com/AvaloniaUI/Avalonia/issues/2098
https://github.com/AvaloniaUI/Avalonia/issues/1635 -->
<Style Selector="NumericUpDown.NormalNumericUpDown:pointerover /template/ ButtonSpinner#PART_Spinner /template/ Border#border">
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}" />
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown:focus-within /template/ ButtonSpinner#PART_Spinner /template/ Border#border">
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}" />
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ ButtonSpinner#PART_Spinner /template/ RepeatButton">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Background" Value="{StaticResource DarkMediumBackgroundBrush}" />
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ ButtonSpinner#PART_Spinner /template/ RepeatButton#PART_IncreaseButton:pointerover">
<Setter Property="Content">
<Template>
<Path Fill="{StaticResource AccentBrush}"
Width="8"
Height="4"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,5 L4.5,.5 9,5 6,5 4.5,3.5 3,5 z"/>
</Template>
</Setter>
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ ButtonSpinner#PART_Spinner /template/ RepeatButton#PART_DecreaseButton:pointerover">
<Setter Property="Content">
<Template>
<Path Fill="{StaticResource AccentBrush}"
Width="8"
Height="4"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,0 L3,0 4.5,1.5 6,0 9,0 4.5,4.5 z"/>
</Template>
</Setter>
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ ButtonSpinner#PART_Spinner /template/ RepeatButton#PART_IncreaseButton:pressed">
<Setter Property="Content">
<Template>
<Path Fill="{StaticResource DarkAccentColor}"
Width="8"
Height="4"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,5 L4.5,.5 9,5 6,5 4.5,3.5 3,5 z"/>
</Template>
</Setter>
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ ButtonSpinner#PART_Spinner /template/ RepeatButton#PART_DecreaseButton:pressed">
<Setter Property="Content">
<Template>
<Path Fill="{StaticResource DarkAccentColor}"
Width="8"
Height="4"
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M0,0 L3,0 4.5,1.5 6,0 9,0 4.5,4.5 z"/>
</Template>
</Setter>
</Style>
<Style Selector="NumericUpDown.NormalNumericUpDown /template/ TextBox#PART_TextBox">
<Setter Property="SelectionBrush" Value="{StaticResource SemiDarkBackgroundBrush}" />
<Setter Property="CaretBrush" Value="{StaticResource AccentBrush}" />
</Style>
</Styles>