Skip to content

Commit 1047ab8

Browse files
authored
Fix: Fixed high contrast support in the Properties window (#12862)
1 parent 1de78a1 commit 1047ab8

File tree

3 files changed

+25
-339
lines changed

3 files changed

+25
-339
lines changed

src/Files.App/App.xaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,6 @@
2626
<CornerRadius x:Key="GridViewThumbnailCornerRadius">2</CornerRadius>
2727
<CornerRadius x:Key="DetailsLayoutThumbnailCornerRadius">2</CornerRadius>
2828

29-
<LinearGradientBrush x:Key="ControlElevationBorderBrush" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,3">
30-
<LinearGradientBrush.RelativeTransform>
31-
<ScaleTransform CenterY="0.5" ScaleY="-1" />
32-
</LinearGradientBrush.RelativeTransform>
33-
<LinearGradientBrush.GradientStops>
34-
<GradientStop Offset="0" Color="{ThemeResource ControlStrokeColorSecondary}" />
35-
<GradientStop Offset="1.0" Color="{ThemeResource ControlStrokeColorDefault}" />
36-
</LinearGradientBrush.GradientStops>
37-
</LinearGradientBrush>
38-
3929
<ResourceDictionary.MergedDictionaries>
4030
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
4131
<ResourceDictionary Source="/ResourceDictionaries/PathIcons.xaml" />

src/Files.App/ResourceDictionaries/NavigationViewItemButtonStyle.xaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,30 @@
77
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives">
88

99
<ResourceDictionary.ThemeDictionaries>
10+
<ResourceDictionary x:Key="Light">
11+
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
12+
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
13+
<StaticResource x:Key="NavigationViewItemBackgroundSelected" ResourceKey="ControlFillColorDefaultBrush" />
14+
<StaticResource x:Key="NavigationViewItemBackgroundSelectedPointerOver" ResourceKey="ControlFillColorDefaultBrush" />
15+
<StaticResource x:Key="NavigationViewItemBackgroundSelectedPressed" ResourceKey="ControlFillColorDefaultBrush" />
16+
17+
<StaticResource x:Key="NavigationViewItemForeground" ResourceKey="TextFillColorPrimaryBrush" />
18+
<StaticResource x:Key="NavigationViewItemForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
19+
<StaticResource x:Key="NavigationViewItemForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
20+
<StaticResource x:Key="NavigationViewItemForegroundSelected" ResourceKey="TextFillColorPrimaryBrush" />
21+
<StaticResource x:Key="NavigationViewItemForegroundSelectedPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
22+
<StaticResource x:Key="NavigationViewItemForegroundSelectedPressed" ResourceKey="TextFillColorPrimaryBrush" />
23+
24+
<StaticResource x:Key="NavigationViewItemBorderBrush" ResourceKey="ControlFillColorTransparentBrush" />
25+
<StaticResource x:Key="NavigationViewItemBorderBrushPointerOver" ResourceKey="ControlElevationBorderBrush" />
26+
<StaticResource x:Key="NavigationViewItemBorderBrushPressed" ResourceKey="ControlStrokeColorDefaultBrush" />
27+
<StaticResource x:Key="NavigationViewItemBorderBrushDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
28+
<StaticResource x:Key="NavigationViewItemBorderBrushSelected" ResourceKey="ControlElevationBorderBrush" />
29+
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedPointerOver" ResourceKey="ControlStrokeColorDefaultBrush" />
30+
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedPressed" ResourceKey="ControlStrokeColorDefaultBrush" />
31+
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
32+
</ResourceDictionary>
33+
1034
<ResourceDictionary x:Key="Dark">
1135
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
1236
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
@@ -31,7 +55,7 @@
3155
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
3256
</ResourceDictionary>
3357

34-
<ResourceDictionary x:Key="Light">
58+
<ResourceDictionary x:Key="HighContrast">
3559
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
3660
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
3761
<StaticResource x:Key="NavigationViewItemBackgroundSelected" ResourceKey="ControlFillColorDefaultBrush" />

0 commit comments

Comments
 (0)