Skip to content

Commit e5788d0

Browse files
committed
fix: column headers mis-aligned with rows
Signed-off-by: leo <longshuang@msn.cn>
1 parent addafd5 commit e5788d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Views/Histories.axaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
2727
<DataGrid x:Name="CommitListContainer"
28+
Classes="static_scrollbar"
2829
ScrollViewer.AllowAutoHide="False"
2930
Background="{DynamicResource Brush.Window}"
3031
SelectionMode="Extended"
@@ -53,13 +54,13 @@
5354
</DataGrid.Resources>
5455

5556
<DataGrid.Styles>
56-
<Style Selector="DataGrid">
57+
<Style Selector="DataGrid.static_scrollbar">
5758
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
5859
<Setter Property="Grid.RowSpan" Value="1" />
5960
<Setter Property="Grid.ColumnSpan" Value="2" />
6061
</Style>
6162
<Style Selector="^ /template/ DataGridColumnHeadersPresenter#PART_ColumnHeadersPresenter">
62-
<Setter Property="Grid.ColumnSpan" Value="1" />
63+
<Setter Property="Grid.Column" Value="0" />
6364
</Style>
6465
<Style Selector="^ /template/ ScrollBar">
6566
<Setter Property="Background" Value="{DynamicResource Brush.Contents}"/>
@@ -187,7 +188,7 @@
187188
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.IsMergedToOpacity}}"
188189
IsHitTestVisible="False"/>
189190

190-
<Border Grid.Column="1" Padding="8,0,4,0" ClipToBounds="True">
191+
<Border Grid.Column="1" Padding="8,0" ClipToBounds="True">
191192
<TextBlock Text="{Binding Author.Name}"
192193
FontWeight="{Binding IsCurrentHead, Converter={x:Static c:BoolConverters.IsBoldToFontWeight}}"
193194
Opacity="{Binding IsMerged, Converter={x:Static c:BoolConverters.IsMergedToOpacity}}"

0 commit comments

Comments
 (0)