Skip to content

Commit

Permalink
Fix: Fixed high contrast support in the Properties window (#12862)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaira2 authored Jul 6, 2023
1 parent 1de78a1 commit 1047ab8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 339 deletions.
10 changes: 0 additions & 10 deletions src/Files.App/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@
<CornerRadius x:Key="GridViewThumbnailCornerRadius">2</CornerRadius>
<CornerRadius x:Key="DetailsLayoutThumbnailCornerRadius">2</CornerRadius>

<LinearGradientBrush x:Key="ControlElevationBorderBrush" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,3">
<LinearGradientBrush.RelativeTransform>
<ScaleTransform CenterY="0.5" ScaleY="-1" />
</LinearGradientBrush.RelativeTransform>
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0" Color="{ThemeResource ControlStrokeColorSecondary}" />
<GradientStop Offset="1.0" Color="{ThemeResource ControlStrokeColorDefault}" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>

<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="/ResourceDictionaries/PathIcons.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@
xmlns:primitives="using:Microsoft.UI.Xaml.Controls.Primitives">

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundSelected" ResourceKey="ControlFillColorDefaultBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundSelectedPointerOver" ResourceKey="ControlFillColorDefaultBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundSelectedPressed" ResourceKey="ControlFillColorDefaultBrush" />

<StaticResource x:Key="NavigationViewItemForeground" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="NavigationViewItemForegroundPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="NavigationViewItemForegroundPressed" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="NavigationViewItemForegroundSelected" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="NavigationViewItemForegroundSelectedPointerOver" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="NavigationViewItemForegroundSelectedPressed" ResourceKey="TextFillColorPrimaryBrush" />

<StaticResource x:Key="NavigationViewItemBorderBrush" ResourceKey="ControlFillColorTransparentBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushPointerOver" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushPressed" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushSelected" ResourceKey="ControlElevationBorderBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedPointerOver" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedPressed" ResourceKey="ControlStrokeColorDefaultBrush" />
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
</ResourceDictionary>

<ResourceDictionary x:Key="Dark">
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
Expand All @@ -31,7 +55,7 @@
<StaticResource x:Key="NavigationViewItemBorderBrushSelectedDisabled" ResourceKey="ControlStrokeColorDefaultBrush" />
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="ControlFillColorSecondaryBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="ControlFillColorTertiaryBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundSelected" ResourceKey="ControlFillColorDefaultBrush" />
Expand Down
Loading

0 comments on commit 1047ab8

Please sign in to comment.