Skip to content

Commit 0e986b4

Browse files
committed
ux: improve the visibility of column headers in dark theme
Signed-off-by: leo <longshuang@msn.cn>
1 parent 8d16897 commit 0e986b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Resources/Themes.axaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<Color x:Key="Color.Link">#0000EE</Color>
3131
<Color x:Key="Color.InlineCode">#FFE4E4E4</Color>
3232
<Color x:Key="Color.InlineCodeFG">Black</Color>
33+
<Color x:Key="Color.DataGridHeaderBG">#FFF0F5F9</Color>
3334
</ResourceDictionary>
3435

3536
<ResourceDictionary x:Key="Dark">
@@ -61,6 +62,7 @@
6162
<Color x:Key="Color.Link">#4DAAFC</Color>
6263
<Color x:Key="Color.InlineCode">#FF383838</Color>
6364
<Color x:Key="Color.InlineCodeFG">#FFF0F0F0</Color>
65+
<Color x:Key="Color.DataGridHeaderBG">#FF2B2B2B</Color>
6466
</ResourceDictionary>
6567
</ResourceDictionary.ThemeDictionaries>
6668

@@ -94,6 +96,7 @@
9496
<SolidColorBrush x:Key="Brush.Link" Color="{DynamicResource Color.Link}"/>
9597
<SolidColorBrush x:Key="Brush.InlineCode" Color="{DynamicResource Color.InlineCode}"/>
9698
<SolidColorBrush x:Key="Brush.InlineCodeFG" Color="{DynamicResource Color.InlineCodeFG}"/>
99+
<SolidColorBrush x:Key="Brush.DataGridHeaderBG" Color="{DynamicResource Color.DataGridHeaderBG}"/>
97100

98101
<FontFamily x:Key="Fonts.Default">fonts:Inter#Inter</FontFamily>
99102
<FontFamily x:Key="Fonts.Monospace">fonts:SourceGit#JetBrains Mono</FontFamily>

src/Views/Histories.axaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<DataGrid x:Name="CommitListContainer"
2828
Classes="static_scrollbar"
2929
ScrollViewer.AllowAutoHide="False"
30-
Background="{DynamicResource Brush.Window}"
30+
Background="{DynamicResource Brush.DataGridHeaderBG}"
3131
SelectionMode="Extended"
3232
ItemsSource="{Binding Commits, Mode=OneWay}"
3333
SelectedItem="{Binding SelectedCommit, Mode=OneWay}"
@@ -54,6 +54,7 @@
5454
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
5555
<Setter Property="Grid.RowSpan" Value="1" />
5656
<Setter Property="Grid.ColumnSpan" Value="2" />
57+
<Setter Property="Background" Value="{DynamicResource Brush.Contents}"/>
5758
</Style>
5859
<Style Selector="^ /template/ DataGridColumnHeadersPresenter#PART_ColumnHeadersPresenter">
5960
<Setter Property="Grid.Column" Value="0" />
@@ -68,7 +69,7 @@
6869

6970
<Style Selector="DataGridColumnHeader">
7071
<Setter Property="MinHeight" Value="24"/>
71-
<Setter Property="Background" Value="{DynamicResource Brush.Window}"/>
72+
<Setter Property="Background" Value="Transparent"/>
7273
<Setter Property="Template">
7374
<ControlTemplate>
7475
<Border x:Name="HeaderBorder"
@@ -107,10 +108,6 @@
107108
</ControlTemplate>
108109
</Setter>
109110
</Style>
110-
111-
<Style Selector="DataGridRowsPresenter">
112-
<Setter Property="Background" Value="{DynamicResource Brush.Contents}"/>
113-
</Style>
114111
</DataGrid.Styles>
115112

116113
<DataGrid.Columns>

0 commit comments

Comments
 (0)