Skip to content

Commit

Permalink
Make TreeDataGrid themes depend less on Fluent theme
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkatz6 committed Jun 1, 2023
1 parent cc154e9 commit e4f4d91
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/Avalonia.Controls.TreeDataGrid/Themes/FluentControls.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush"
Color="{StaticResource SystemBaseMediumLowColor}"
Opacity="0.4" />
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Color="{StaticResource SystemListLowColor}" />
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPressed" Color="{StaticResource SystemBaseMediumLowColor}" />
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPointerOver" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPressed" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPointerOver" Color="{StaticResource SystemBaseHighColor}" />
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPressed" Color="{StaticResource SystemBaseHighColor}" />
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush"
Color="{StaticResource SystemBaseMediumLowColor}"
Opacity="0.4" />
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Color="{StaticResource SystemListLowColor}" />
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPointerOver" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPressed" Color="{StaticResource SystemBaseMediumLowColor}" />
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPointerOver" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPressed" Color="Transparent" />
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPointerOver" Color="{StaticResource SystemBaseHighColor}" />
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPressed" Color="{StaticResource SystemBaseHighColor}" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

Expand Down Expand Up @@ -117,15 +125,15 @@
</Setter>

<Style Selector="^:pointerover /template/ Border#DataGridBorder">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPointerOver}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPointerOver}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ButtonForegroundPointerOver}" />
<Setter Property="Background" Value="{DynamicResource TreeDataGridHeaderBackgroundPointerOver}" />
<Setter Property="BorderBrush" Value="{DynamicResource TreeDataGridHeaderBorderBrushPointerOver}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TreeDataGridHeaderForegroundPointerOver}" />
</Style>

<Style Selector="^:pressed /template/ Border#DataGridBorder">
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPressed}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
<Setter Property="Background" Value="{DynamicResource TreeDataGridHeaderBackgroundPressed}" />
<Setter Property="BorderBrush" Value="{DynamicResource TreeDataGridHeaderBorderBrushPressed}" />
<Setter Property="TextBlock.Foreground" Value="{DynamicResource TreeDataGridHeaderForegroundPressed}" />
</Style>

<Style Selector="^[SortDirection=Ascending] /template/ Path#SortIcon">
Expand Down

0 comments on commit e4f4d91

Please sign in to comment.