ux: new style for NumericUpDown

This commit is contained in:
leo 2024-06-14 15:46:52 +08:00
parent 6974b0e08d
commit 5bb41ed65f
No known key found for this signature in database
GPG key ID: B528468E49CD0E58
2 changed files with 25 additions and 28 deletions

View file

@ -26,6 +26,11 @@
<Setter Property="ExtendClientAreaToDecorationsHint" Value="True"/>
<Setter Property="SystemDecorations" Value="Full"/>
<Setter Property="Padding" Value="0"/>
<Style.Resources>
<SolidColorBrush x:Key="SystemControlErrorTextForegroundBrush" Color="Red"/>
<SolidColorBrush x:Key="SystemErrorTextColor" Color="Red"/>
</Style.Resources>
</Style>
<Style Selector="Window[WindowState=Maximized]">
@ -1294,4 +1299,22 @@
<Style Selector="TreeDataGridExpanderCell[IsExpanded=False] Path.folder_icon">
<Setter Property="Data" Value="{StaticResource Icons.Folder.Fill}"/>
</Style>
<Style Selector="NumericUpDown">
<Style Selector="^ /template/ ButtonSpinner#PART_Spinner">
<Setter Property="MinHeight" Value="0"/>
<Setter Property="Height" Value="28"/>
</Style>
<Style Selector="^ /template/ TextBox#PART_TextBox">
<Setter Property="MinHeight" Value="0"/>
<Setter Property="Height" Value="28"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
<Style Selector="^:focus-within /template/ ButtonSpinner#PART_Spinner">
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Accent}"/>
</Style>
<Style Selector="^ /template/ TextBox#PART_TextBox /template/ Border#PART_BorderElement">
<Setter Property="IsVisible" Value="False"/>
</Style>
</Style>
</Styles>