Skip to content

Commit 958dc1b

Browse files
committed
Introduce Generic.xaml with default TreeDataGrid styles, and make Fluent.axaml inherit it
1 parent 95632c9 commit 958dc1b

File tree

3 files changed

+364
-340
lines changed

3 files changed

+364
-340
lines changed
Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
<Styles xmlns="https://github.com/avaloniaui"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
33

4+
<StyleInclude Source="/Themes/Generic.axaml" />
5+
46
<Styles.Resources>
57
<ResourceDictionary>
6-
<ResourceDictionary.MergedDictionaries>
7-
<MergeResourceInclude Source="/Themes/FluentControls.axaml" />
8-
</ResourceDictionary.MergedDictionaries>
8+
<ResourceDictionary.ThemeDictionaries>
9+
<ResourceDictionary x:Key="Default">
10+
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Color="{StaticResource SystemListLowColor}" />
11+
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPointerOverBrush" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
12+
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPressedBrush" Color="{StaticResource SystemBaseMediumLowColor}" />
13+
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPointerOverBrush" Color="Transparent" />
14+
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPressedBrush" Color="Transparent" />
15+
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPointerOverBrush" Color="{StaticResource SystemBaseHighColor}" />
16+
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPressedBrush" Color="{StaticResource SystemBaseHighColor}" />
17+
<SolidColorBrush x:Key="TreeDataGridSelectedCellBackgroundBrush" Color="{StaticResource SystemAccentColor}" Opacity="0.4" />
18+
</ResourceDictionary>
19+
<ResourceDictionary x:Key="Dark">
20+
<SolidColorBrush x:Key="TreeDataGridGridLinesBrush" Color="{StaticResource SystemListLowColor}" />
21+
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPointerOverBrush" Color="{StaticResource SystemBaseHighColor}" Opacity="0.1" />
22+
<SolidColorBrush x:Key="TreeDataGridHeaderBackgroundPressedBrush" Color="{StaticResource SystemBaseMediumLowColor}" />
23+
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPointerOverBrush" Color="Transparent" />
24+
<SolidColorBrush x:Key="TreeDataGridHeaderBorderBrushPressedBrush" Color="Transparent" />
25+
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPointerOverBrush" Color="{StaticResource SystemBaseHighColor}" />
26+
<SolidColorBrush x:Key="TreeDataGridHeaderForegroundPressedBrush" Color="{StaticResource SystemBaseHighColor}" />
27+
<SolidColorBrush x:Key="TreeDataGridSelectedCellBackgroundBrush" Color="{StaticResource SystemAccentColor}" Opacity="0.4" />
28+
</ResourceDictionary>
29+
</ResourceDictionary.ThemeDictionaries>
930
</ResourceDictionary>
1031
</Styles.Resources>
1132

12-
<Style Selector=":is(TreeDataGridCell)">
13-
<Setter Property="Background" Value="Transparent"/>
14-
<Setter Property="MinHeight" Value="25"/>
15-
</Style>
16-
17-
<Style Selector=":is(TreeDataGridCell):selected">
18-
<Setter Property="Background" Value="{DynamicResource TreeDataGridSelectedCellBackgroundBrush}"/>
19-
</Style>
20-
2133
</Styles>

src/Avalonia.Controls.TreeDataGrid/Themes/FluentControls.axaml

Lines changed: 0 additions & 328 deletions
This file was deleted.

0 commit comments

Comments
 (0)