Skip to content

Commit addafd5

Browse files
committed
ux: commit list in HISTORY page will always turn AllowAutoHide off (#1980) (#1794)
Signed-off-by: leo <longshuang@msn.cn>
1 parent f7836c0 commit addafd5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/Resources/Styles.axaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
<Setter Property="MinHeight" Value="12"/>
241241
<Setter Property="ShowDelay" Value="0:0:0.1"/>
242242
<Setter Property="HideDelay" Value="0:0:0.2"/>
243+
<Setter Property="Background" Value="Transparent"/>
243244

244245
<Style Selector="^ /template/ RepeatButton">
245246
<Setter Property="Background" Value="Transparent" />
@@ -264,7 +265,7 @@
264265
<Setter Property="Height" Value="8" />
265266
<Setter Property="Template">
266267
<ControlTemplate>
267-
<Border Background="Transparent" UseLayoutRounding="False">
268+
<Border Background="{TemplateBinding Background}" UseLayoutRounding="False">
268269
<Grid Name="PART_RootGrid" ColumnDefinitions="12,*,12">
269270
<RepeatButton Name="PART_LineUpButton"
270271
Grid.Row="0" Grid.Column="0"
@@ -318,7 +319,7 @@
318319
<Setter Property="Width" Value="8" />
319320
<Setter Property="Template">
320321
<ControlTemplate TargetType="ScrollBar">
321-
<Border Background="Transparent" UseLayoutRounding="False">
322+
<Border Background="{TemplateBinding Background}" UseLayoutRounding="False">
322323
<Grid RowDefinitions="12,*,12">
323324
<RepeatButton Name="PART_LineUpButton"
324325
Grid.Row="0"

src/Views/Histories.axaml

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

2626
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
2727
<DataGrid x:Name="CommitListContainer"
28-
Classes.static_scrollbar="{Binding Source={x:Static vm:Preferences.Instance}, Path=!UseAutoHideScrollBars, Mode=OneWay}"
28+
ScrollViewer.AllowAutoHide="False"
2929
Background="{DynamicResource Brush.Window}"
3030
SelectionMode="Extended"
3131
ItemsSource="{Binding Commits, Mode=OneWay}"
@@ -52,15 +52,18 @@
5252
<SolidColorBrush x:Key="DataGridGridLinesBrush" Color="{DynamicResource Color.Border0}" />
5353
</DataGrid.Resources>
5454

55-
<DataGrid.Styles>
56-
<Style Selector="DataGrid.static_scrollbar">
55+
<DataGrid.Styles>
56+
<Style Selector="DataGrid">
5757
<Style Selector="^ /template/ DataGridRowsPresenter#PART_RowsPresenter">
5858
<Setter Property="Grid.RowSpan" Value="1" />
5959
<Setter Property="Grid.ColumnSpan" Value="2" />
6060
</Style>
6161
<Style Selector="^ /template/ DataGridColumnHeadersPresenter#PART_ColumnHeadersPresenter">
6262
<Setter Property="Grid.ColumnSpan" Value="1" />
6363
</Style>
64+
<Style Selector="^ /template/ ScrollBar">
65+
<Setter Property="Background" Value="{DynamicResource Brush.Contents}"/>
66+
</Style>
6467
</Style>
6568

6669
<Style Selector="DataGridColumnHeader">

0 commit comments

Comments
 (0)