| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- <Styles xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!-- ═══════════════════════════════════════════════════════════════
- YZWater3 工业风格控件样式
- ═══════════════════════════════════════════════════════════════ -->
- <!-- ─── 全局按钮: 手型光标 ─── -->
- <Style Selector="Button">
- <Setter Property="Cursor" Value="Hand"/>
- <Setter Property="CornerRadius" Value="5"/>
- </Style>
- <Style Selector="Border.surface-card">
- <Setter Property="CornerRadius" Value="6"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
- </Style>
- <!-- ─── 按钮: Success ─── -->
- <Style Selector="Button.btn-success">
- <Setter Property="Background" Value="{DynamicResource SuccessBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}"/>
- <Setter Property="FontFamily" Value="{DynamicResource MonoFont}"/>
- <Setter Property="FontSize" Value="11"/>
- <Setter Property="Padding" Value="12,6"/>
- <Setter Property="CornerRadius" Value="5"/>
- <Setter Property="MinHeight" Value="32"/>
- </Style>
- <Style Selector="Button.btn-success:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource SuccessHoverBrush}"/>
- </Style>
- <Style Selector="Button.btn-success:pressed /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource SuccessPressedBrush}"/>
- </Style>
- <Style Selector="Button.btn-success:disabled">
- <Setter Property="Opacity" Value="0.4"/>
- </Style>
- <!-- ─── 按钮: Danger ─── -->
- <Style Selector="Button.btn-danger">
- <Setter Property="Background" Value="{DynamicResource SurfaceBgBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource DangerBrush}"/>
- <Setter Property="FontFamily" Value="{DynamicResource MonoFont}"/>
- <Setter Property="FontSize" Value="11"/>
- <Setter Property="Padding" Value="12,6"/>
- <Setter Property="CornerRadius" Value="5"/>
- <Setter Property="MinHeight" Value="32"/>
- </Style>
- <Style Selector="Button.btn-danger:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource DangerHoverBrush}"/>
- </Style>
- <Style Selector="Button.btn-danger:pressed /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource DangerPressedBrush}"/>
- </Style>
- <Style Selector="Button.btn-danger:disabled">
- <Setter Property="Opacity" Value="0.4"/>
- </Style>
- <!-- ─── 按钮: Info ─── -->
- <Style Selector="Button.btn-info">
- <Setter Property="Background" Value="{DynamicResource SurfaceBgBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource InfoBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource InfoBrush}"/>
- <Setter Property="FontFamily" Value="{DynamicResource MonoFont}"/>
- <Setter Property="FontSize" Value="11"/>
- <Setter Property="Padding" Value="12,6"/>
- <Setter Property="CornerRadius" Value="5"/>
- <Setter Property="MinHeight" Value="32"/>
- </Style>
- <Style Selector="Button.btn-info:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource InfoHoverBrush}"/>
- </Style>
- <Style Selector="Button.btn-info:pressed /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource InfoPressedBrush}"/>
- </Style>
- <Style Selector="Button.btn-info:disabled">
- <Setter Property="Opacity" Value="0.4"/>
- </Style>
- <!-- ─── 按钮: Warning ─── -->
- <Style Selector="Button.btn-warning">
- <Setter Property="Background" Value="{DynamicResource SurfaceBgBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource WarningBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource WarningBrush}"/>
- <Setter Property="FontFamily" Value="{DynamicResource MonoFont}"/>
- <Setter Property="FontSize" Value="11"/>
- <Setter Property="Padding" Value="12,6"/>
- <Setter Property="CornerRadius" Value="2"/>
- <Setter Property="MinHeight" Value="32"/>
- </Style>
- <Style Selector="Button.btn-warning:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource WarningHoverBrush}"/>
- </Style>
- <Style Selector="Button.btn-warning:pressed /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource WarningPressedBrush}"/>
- </Style>
- <Style Selector="Button.btn-warning:disabled">
- <Setter Property="Opacity" Value="0.4"/>
- </Style>
- <!-- ─── 切换按钮 (主题/语言) ─── -->
- <Style Selector="Button.btn-toggle">
- <Setter Property="Background" Value="{DynamicResource ToggleBgBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource ToggleBorderBrush}"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="CornerRadius" Value="4"/>
- <Setter Property="Padding" Value="10,6"/>
- <Setter Property="MinHeight" Value="32"/>
- <Setter Property="FontFamily" Value="{DynamicResource MonoFont}"/>
- <Setter Property="FontSize" Value="11"/>
- <Setter Property="FontWeight" Value="Bold"/>
- </Style>
- <Style Selector="Button.btn-toggle:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource SuccessBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}"/>
- </Style>
- <Style Selector="Button.btn-toggle:pressed /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource SuccessPressedBrush}"/>
- </Style>
- <!-- ─── 视图切换:禁用项即当前已选视图 ─── -->
- <Style Selector="Button.view-switch">
- <Setter Property="Background" Value="{DynamicResource PanelBgBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource TextTertiaryBrush}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Setter Property="CornerRadius" Value="4"/>
- <Setter Property="Padding" Value="12,4"/>
- <Setter Property="MinHeight" Value="26"/>
- <Setter Property="FontFamily" Value="{DynamicResource MonoFont}"/>
- <Setter Property="FontSize" Value="10"/>
- </Style>
- <Style Selector="Button.view-switch:pointerover /template/ ContentPresenter">
- <Setter Property="Background" Value="{DynamicResource ToggleBgBrush}"/>
- <Setter Property="Foreground" Value="{DynamicResource InfoBrush}"/>
- </Style>
- <Style Selector="Button.view-switch:disabled">
- <Setter Property="Opacity" Value="1"/>
- <Setter Property="Background" Value="{DynamicResource SuccessBrush}"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="BorderBrush" Value="{DynamicResource SuccessBrush}"/>
- <Setter Property="FontWeight" Value="Bold"/>
- </Style>
- </Styles>
|