theme: fix foreground/background bindings and list backgrounds\n\n- Define CSurface/CForeground colors; remove invalid .Color DynamicResource usage\n- Restore ListBox background to surface for readability\n- Ensure ThemeForegroundBrush resolves correctly so text is visible
This commit is contained in:
parent
301347ad73
commit
44b8b36212
1 changed files with 8 additions and 5 deletions
|
@ -1,6 +1,9 @@
|
|||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Styles.Resources>
|
||||
<!-- Base surface + foreground colors as Color resources to allow reuse -->
|
||||
<Color x:Key="CSurface">#FFF0F4F7</Color>
|
||||
<Color x:Key="CForeground">#FF0F1A21</Color>
|
||||
<!-- Core palette -->
|
||||
<Color x:Key="CPrimary1">#FF5AC3D6</Color>
|
||||
<Color x:Key="CPrimary2">#FF223544</Color>
|
||||
|
@ -18,9 +21,9 @@
|
|||
<SolidColorBrush x:Key="Brush.Emph3" Color="{DynamicResource CEmph3}"/>
|
||||
|
||||
<!-- Derived brushes for surfaces and text -->
|
||||
<SolidColorBrush x:Key="Brush.Surface">#F0F4F7</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="Brush.Surface" Color="{DynamicResource CSurface}"/>
|
||||
<SolidColorBrush x:Key="Brush.SurfaceAlt" Color="{DynamicResource CPrimary3}" Opacity="0.10"/>
|
||||
<SolidColorBrush x:Key="Brush.Foreground">#FF0F1A21</SolidColorBrush>
|
||||
<SolidColorBrush x:Key="Brush.Foreground" Color="{DynamicResource CForeground}"/>
|
||||
<SolidColorBrush x:Key="Brush.ForegroundOnPrimary">#FFFFFFFF</SolidColorBrush>
|
||||
|
||||
<!-- Utility tints -->
|
||||
|
@ -30,8 +33,8 @@
|
|||
|
||||
<!-- Accent + theme integration (FluentTheme consumes these) -->
|
||||
<SolidColorBrush x:Key="ThemeAccentBrush" Color="{DynamicResource CPrimary1}"/>
|
||||
<SolidColorBrush x:Key="ThemeBackgroundBrush" Color="{DynamicResource Brush.Surface.Color}"/>
|
||||
<SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource Brush.Foreground.Color}"/>
|
||||
<SolidColorBrush x:Key="ThemeBackgroundBrush" Color="{DynamicResource CSurface}"/>
|
||||
<SolidColorBrush x:Key="ThemeForegroundBrush" Color="{DynamicResource CForeground}"/>
|
||||
</Styles.Resources>
|
||||
|
||||
<!-- Window background -->
|
||||
|
@ -115,7 +118,7 @@
|
|||
<Setter Property="BorderBrush" Value="{DynamicResource ThemeAccentBrush}"/>
|
||||
</Style>
|
||||
<Style Selector="ListBox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Background" Value="{DynamicResource Brush.Surface}"/>
|
||||
</Style>
|
||||
|
||||
<!-- Menus & flyouts -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue