调整配色

This commit is contained in:
GG Z
2025-09-04 23:13:36 +08:00
parent 36234cb529
commit f03dd8ac58
6 changed files with 22 additions and 15 deletions

View File

@@ -20,9 +20,10 @@
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="assists:ShadingAssist.LightShadowBrush" Value="{DynamicResource LightShadowBrush}"/>
<Setter Property="assists:ShadingAssist.DarkShadowBrush" Value="{DynamicResource DarkShadowBrush}"/>
<Setter Property="KeyboardNavigation.DirectionalNavigation" Value="None" />
<Setter Property="IconBrush" Value="{DynamicResource PrimaryNormalBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="assists:ControlAssist.CornerRadius" Value="4" />
<!--<Setter Property="Background" Value="{Binding IconBrush, Mode=OneWay, RelativeSource={RelativeSource Self}, Converter={StaticResource ColorPaletteConverter}, ConverterParameter=1}" />-->
<!--<Setter Property="BorderBrush" Value="{Binding IconBrush, Mode=OneWay, RelativeSource={RelativeSource Self}, Converter={StaticResource ColorPaletteConverter}, ConverterParameter=3}" />-->
@@ -40,13 +41,14 @@
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
LightShadowBrush="{TemplateBinding assists:ShadingAssist.LightShadowBrush}"
DarkShadowBrush="{TemplateBinding assists:ShadingAssist.DarkShadowBrush}"
CornerRadius="{TemplateBinding assists:ControlAssist.CornerRadius}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Intensity="0.3"
UseLayoutRounding="True">
<Grid>
<Grid.Resources>
<!-- TODO 是否可复用? -->
<Style x:Key="AlertCloseButton" TargetType="{x:Type Button}">
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
@@ -172,27 +174,34 @@
<Setter Property="IconBrush" Value="{DynamicResource InfoBrush}" />
<Setter Property="Background" Value="{DynamicResource InfoLightShadowBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource InfoDisabledBrush}" />
<Setter Property="assists:ShadingAssist.LightShadowBrush" Value="{DynamicResource InfoLightShadowBrush}"/>
<Setter Property="assists:ShadingAssist.DarkShadowBrush" Value="{DynamicResource InfoDarkShadowBrush}"/>
</Trigger>
<Trigger Property="Type" Value="Success">
<!--<Setter Property="Icon" Value="check-circle" />-->
<Setter Property="IconBrush" Value="{DynamicResource SuccessBrush}" />
<Setter Property="Background" Value="{DynamicResource SuccessLightShadowBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource SuccessDisabledBrush}" />
<Setter Property="assists:ShadingAssist.LightShadowBrush" Value="{DynamicResource SuccessLightShadowBrush}"/>
<Setter Property="assists:ShadingAssist.DarkShadowBrush" Value="{DynamicResource SuccessDarkShadowBrush}"/>
</Trigger>
<Trigger Property="Type" Value="Warning">
<!--<Setter Property="Icon" Value="exclamation-circle" />-->
<Setter Property="IconBrush" Value="{DynamicResource WarningBrush}" />
<Setter Property="Background" Value="{DynamicResource WarningLightShadowBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource WarningDisabledBrush}" />
<Setter Property="assists:ShadingAssist.LightShadowBrush" Value="{DynamicResource WarningLightShadowBrush}"/>
<Setter Property="assists:ShadingAssist.DarkShadowBrush" Value="{DynamicResource WarningDarkShadowBrush}"/>
</Trigger>
<Trigger Property="Type" Value="Error">
<!--<Setter Property="Icon" Value="close-circle" />-->
<Setter Property="IconBrush" Value="{DynamicResource ErrorBrush}" />
<Setter Property="Background" Value="{DynamicResource ErrorLightShadowBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource ErrorDisabledBrush}" />
<Setter Property="assists:ShadingAssist.LightShadowBrush" Value="{DynamicResource ErrorLightShadowBrush}"/>
<Setter Property="assists:ShadingAssist.DarkShadowBrush" Value="{DynamicResource ErrorDarkShadowBrush}"/>
</Trigger>
<Trigger Property="Banner" Value="True">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="assists:ControlAssist.CornerRadius" Value="0" />
</Trigger>
</Style.Triggers>

View File

@@ -261,7 +261,7 @@
<Setter Property="assists:ShadingAssist.LightShadowBrush" Value="{DynamicResource PrimaryLightShadowBrush}" />
<Setter Property="assists:ShadingAssist.DarkShadowBrush" Value="{DynamicResource PrimaryDarkShadowBrush}" />
<Setter Property="assists:ShadingAssist.DisabledBackground" Value="{DynamicResource PrimaryDisabledBrush}" />
<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource TextDisabledBrush}" />
<!--<Setter Property="assists:ShadingAssist.DisabledForeground" Value="{DynamicResource TextDisabledBrush}" />-->
<Setter Property="assists:ShadingAssist.LightedBorder">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">

View File

@@ -4,9 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type ToggleButton}" x:Key="ExpandCollapseToggleButtonStyle">
<!-- Universal WPF UI focus -->
<Setter Property="FocusVisualStyle" Value="{DynamicResource FocusVisual}" />
<!-- Universal WPF UI focus -->
<Setter Property="Focusable" Value="False" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />

View File

@@ -215,17 +215,17 @@
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Foreground" Value="{DynamicResource PrimaryNormalBrush}" />
<Setter Property="Background" TargetName="border" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
<Setter Property="Background" TargetName="border" Value="{DynamicResource ControlBackgroundSelectedBrush}" />
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}" />
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
<Setter Property="Background" TargetName="border" Value="{DynamicResource ControlBackgroundHoverBrush}" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{DynamicResource TextDisabledBrush}" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{DynamicResource BackgroundFloatingBrush}" />
<Setter Property="Background" TargetName="border" Value="{DynamicResource ControlBackgroundPressedBrush}" />
</Trigger>
</ControlTemplate.Triggers>

View File

@@ -30,12 +30,12 @@
阴影色组
用于拟态高光和深度阴影
-->
<Color x:Key="PrimaryLightShadowColor">#E3F2FD</Color>
<Color x:Key="PrimaryLightShadowColor">#1A3A75</Color>
<SolidColorBrush x:Key="PrimaryLightShadowBrush" Color="{DynamicResource PrimaryLightShadowColor}" />
<Color x:Key="PrimaryDarkShadowColor">#2962FF</Color>
<Color x:Key="PrimaryDarkShadowColor">#4D7FE0</Color>
<SolidColorBrush x:Key="PrimaryDarkShadowBrush" Color="{DynamicResource PrimaryDarkShadowColor}" />
<!--
渐变色与特效(未改动,保持原样)
-->

View File

@@ -41,7 +41,7 @@
<SolidColorBrush x:Key="InfoDisabledBrush" Color="{DynamicResource InfoDisabledColor}" />
<!-- 信息亮阴影色(信息卡片高光) -->
<Color x:Key="InfoLightShadowColor">#EBF5FB</Color>
<Color x:Key="InfoLightShadowColor">#FFDEF0FA</Color>
<SolidColorBrush x:Key="InfoLightShadowBrush" Color="{DynamicResource InfoLightShadowColor}" />
<!-- 信息暗阴影色(信息卡片深度) -->
@@ -69,7 +69,7 @@
<SolidColorBrush x:Key="ErrorLightShadowBrush" Color="{DynamicResource ErrorLightShadowColor}" />
<!-- 错误暗阴影色(错误提示卡片深度) -->
<Color x:Key="ErrorDarkShadowColor">#e4c8c8</Color>
<Color x:Key="ErrorDarkShadowColor">#943126</Color>
<SolidColorBrush x:Key="ErrorDarkShadowBrush" Color="{DynamicResource ErrorDarkShadowColor}" />
<!-- 警告主色(用于警告提示、需注意信息) -->