Skip to content

Commit 811fdc5

Browse files
authored
Fix sidebar background brush, make HC work, and remove old style (#5264)
1 parent a2445c9 commit 811fdc5

File tree

6 files changed

+69
-108
lines changed

6 files changed

+69
-108
lines changed

Files/App.xaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,17 @@
9393
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="{StaticResource SolidBackgroundFillColorBase}" />
9494
</ResourceDictionary>
9595
<ResourceDictionary x:Key="HighContrast">
96+
<SolidColorBrush x:Key="ApplicationPageBackgroundThemeBrush" Color="{StaticResource SystemColorWindowColor}" />
97+
<StaticResource x:Key="SolidBackgroundFillColorBase" ResourceKey="SystemColorWindowColor" />
98+
<StaticResource x:Key="SolidBackgroundFillColorSecondary" ResourceKey="SystemColorWindowColor" />
99+
<StaticResource x:Key="SolidBackgroundFillColorTertiary" ResourceKey="SystemColorWindowColor" />
100+
<StaticResource x:Key="SolidBackgroundFillColorQuarternary" ResourceKey="SystemColorWindowColor" />
101+
<StaticResource x:Key="ControlStrokeColorDefault" ResourceKey="SystemColorWindowTextColor" />
102+
<StaticResource x:Key="ControlStrokeColorSecondary" ResourceKey="SystemColorWindowTextColor" />
103+
<SolidColorBrush x:Key="SolidBackgroundFillColorBaseBrush" Color="{StaticResource SystemColorWindowColor}" />
104+
<SolidColorBrush x:Key="SolidBackgroundFillColorSecondaryBrush" Color="{StaticResource SystemColorWindowColor}" />
105+
<SolidColorBrush x:Key="SolidBackgroundFillColorTertiaryBrush" Color="{StaticResource SystemColorWindowColor}" />
106+
<SolidColorBrush x:Key="SolidBackgroundFillColorQuarternaryBrush" Color="{StaticResource SystemColorWindowColor}" />
96107
<SolidColorBrush x:Key="CloudDriveSyncStatusOnlineColor" Color="#0078D7" />
97108
<SolidColorBrush x:Key="CloudDriveSyncStatusOfflineColor" Color="#30BB03" />
98109
<SolidColorBrush x:Key="CloudDriveSyncStatusExcludedColor" Color="#AAAAAA" />
@@ -104,11 +115,11 @@
104115
<x:Double x:Key="SidebarTintOpacity">0.8</x:Double>
105116
<x:Double x:Key="SidebarTintLuminosityOpacity">0.8</x:Double>
106117
<!-- Tabs -->
107-
<SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SystemControlBackgroundBaseLow}" />
108-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource SystemControlHighlightChromeHigh}" />
109-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SystemControlHighlightChromeHigh}" />
110-
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SystemControlHighlightChromeHigh}" />
111-
<SolidColorBrush x:Key="TabViewItemSeparator" Color="{StaticResource SystemControlForegroundBaseLow}" />
118+
<SolidColorBrush x:Key="TabViewItemHeaderBackground" Color="{StaticResource SystemColorWindowColor}" />
119+
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource SystemColorHighlightColor}" />
120+
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SystemColorHighlightColor}" />
121+
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SystemColorHighlightColor}" />
122+
<SolidColorBrush x:Key="TabViewItemSeparator" Color="{StaticResource SystemColorGrayTextColor}" />
112123
<SolidColorBrush x:Key="TabContainerFillColorPrimary" Color="{StaticResource SolidBackgroundFillColorTertiary}" />
113124
<SolidColorBrush x:Key="TabContainerFillColorSecondary" Color="{StaticResource SolidBackgroundFillColorSecondary}" />
114125
<!-- Navigation Toolbar -->
@@ -118,9 +129,9 @@
118129
<!-- PaneHolderPage -->
119130
<SolidColorBrush x:Key="PaneHolderPageBackgroundBrush" Color="{StaticResource SolidBackgroundFillColorSecondary}" />
120131
<!-- Status Bar Control -->
121-
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="{StaticResource SolidBackgroundFillColorBase}" />
132+
<SolidColorBrush x:Key="StatusBarBackgroundBrush" Color="{ThemeResource SolidBackgroundFillColorBase}" />
122133
<!-- File Browser Control -->
123-
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="{StaticResource SolidBackgroundFillColorBase}" />
134+
<SolidColorBrush x:Key="FileBrowserBackgroundBrush" Color="{ThemeResource SolidBackgroundFillColorBase}" />
124135
</ResourceDictionary>
125136
</ResourceDictionary.ThemeDictionaries>
126137
<LinearGradientBrush x:Key="ControlElevationBorderBrush" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,3">

Files/ResourceDictionaries/TabView_themeresources.xaml

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -111,45 +111,45 @@
111111
</ResourceDictionary>
112112

113113
<ResourceDictionary x:Key="HighContrast">
114-
<StaticResource x:Key="TabViewBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
115-
<StaticResource x:Key="TabViewItemHeaderBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
116-
<StaticResource x:Key="TabViewItemHeaderForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
117-
<StaticResource x:Key="TabViewItemHeaderForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
118-
<StaticResource x:Key="TabViewItemHeaderForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
119-
<StaticResource x:Key="TabViewItemHeaderForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
120-
<StaticResource x:Key="TabViewItemHeaderForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
121-
<StaticResource x:Key="TabViewItemIconForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />
122-
<StaticResource x:Key="TabViewItemIconForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
123-
<StaticResource x:Key="TabViewItemIconForegroundSelected" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
124-
<StaticResource x:Key="TabViewItemIconForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
125-
<StaticResource x:Key="TabViewItemIconForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
126-
<StaticResource x:Key="TabViewButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
127-
<StaticResource x:Key="TabViewButtonBackgroundPressed" ResourceKey="SystemControlHighlightChromeHighBrush" />
128-
<StaticResource x:Key="TabViewButtonBackgroundPointerOver" ResourceKey="SystemControlHighlightChromeHighBrush" />
129-
<StaticResource x:Key="TabViewButtonBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
130-
<StaticResource x:Key="TabViewButtonForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />
131-
<StaticResource x:Key="TabViewButtonForegroundPressed" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
132-
<StaticResource x:Key="TabViewButtonForegroundPointerOver" ResourceKey="SystemControlHighlightAltBaseHighBrush" />
133-
<StaticResource x:Key="TabViewButtonForegroundDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
134-
<StaticResource x:Key="TabViewScrollButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
135-
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
136-
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
137-
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPointerOver" ResourceKey="SystemControlBackgroundListLowBrush" />
138-
<StaticResource x:Key="TabViewItemHeaderPressedCloseButtonBackground" ResourceKey="SystemControlTransparentBrush" />
139-
<StaticResource x:Key="TabViewItemHeaderPointerOverCloseButtonBackground" ResourceKey="SystemControlTransparentBrush" />
140-
<StaticResource x:Key="TabViewItemHeaderSelectedCloseButtonBackground" ResourceKey="SystemControlTransparentBrush" />
141-
<StaticResource x:Key="TabViewItemHeaderDisabledCloseButtonBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
142-
<StaticResource x:Key="TabViewItemHeaderCloseButtonForeground" ResourceKey="SystemControlForegroundBaseMediumBrush" />
143-
<StaticResource x:Key="TabViewItemHeaderCloseButtonForegroundPressed" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
144-
<StaticResource x:Key="TabViewItemHeaderCloseButtonForegroundPointerOver" ResourceKey="SystemControlForegroundBaseMediumHighBrush" />
145-
<StaticResource x:Key="TabViewItemHeaderPressedCloseButtonForeground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
146-
<StaticResource x:Key="TabViewItemHeaderPointerOverCloseButtonForeground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
147-
<StaticResource x:Key="TabViewItemHeaderSelectedCloseButtonForeground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
148-
<StaticResource x:Key="TabViewItemHeaderDisabledCloseButtonForeground" ResourceKey="SystemControlDisabledBaseMediumLowBrush" />
114+
<StaticResource x:Key="TabViewBackground" ResourceKey="SystemColorButtonFaceColor" />
115+
<StaticResource x:Key="TabViewItemHeaderBackgroundDisabled" ResourceKey="SystemColorWindowColor" />
116+
<StaticResource x:Key="TabViewItemHeaderForeground" ResourceKey="SystemColorButtonTextColor" />
117+
<StaticResource x:Key="TabViewItemHeaderForegroundPressed" ResourceKey="SystemColorButtonTextColor" />
118+
<StaticResource x:Key="TabViewItemHeaderForegroundSelected" ResourceKey="SystemColorButtonTextColor" />
119+
<StaticResource x:Key="TabViewItemHeaderForegroundPointerOver" ResourceKey="SystemColorButtonTextColor" />
120+
<StaticResource x:Key="TabViewItemHeaderForegroundDisabled" ResourceKey="SystemColorGrayTextColor" />
121+
<StaticResource x:Key="TabViewItemIconForeground" ResourceKey="SystemColorButtonTextColor" />
122+
<StaticResource x:Key="TabViewItemIconForegroundPressed" ResourceKey="SystemColorButtonTextColor" />
123+
<StaticResource x:Key="TabViewItemIconForegroundSelected" ResourceKey="SystemColorButtonTextColor" />
124+
<StaticResource x:Key="TabViewItemIconForegroundPointerOver" ResourceKey="SystemColorButtonTextColor" />
125+
<StaticResource x:Key="TabViewItemIconForegroundDisabled" ResourceKey="SystemColorGrayTextColor" />
126+
<StaticResource x:Key="TabViewButtonBackground" ResourceKey="SystemColorButtonFaceColor" />
127+
<StaticResource x:Key="TabViewButtonBackgroundPressed" ResourceKey="SystemColorHighlightColor" />
128+
<StaticResource x:Key="TabViewButtonBackgroundPointerOver" ResourceKey="SystemColorHighlightColor" />
129+
<StaticResource x:Key="TabViewButtonBackgroundDisabled" ResourceKey="SystemColorWindowColor" />
130+
<StaticResource x:Key="TabViewButtonForeground" ResourceKey="SystemColorButtonTextColor" />
131+
<StaticResource x:Key="TabViewButtonForegroundPressed" ResourceKey="SystemColorButtonTextColor" />
132+
<StaticResource x:Key="TabViewButtonForegroundPointerOver" ResourceKey="SystemColorButtonTextColor" />
133+
<StaticResource x:Key="TabViewButtonForegroundDisabled" ResourceKey="SystemColorGrayTextColor" />
134+
<StaticResource x:Key="TabViewScrollButtonBackground" ResourceKey="SystemColorButtonFaceColor" />
135+
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackground" ResourceKey="SystemColorButtonFaceColor" />
136+
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPressed" ResourceKey="SystemColorHighlightColor" />
137+
<StaticResource x:Key="TabViewItemHeaderCloseButtonBackgroundPointerOver" ResourceKey="SystemColorHighlightColor" />
138+
<StaticResource x:Key="TabViewItemHeaderPressedCloseButtonBackground" ResourceKey="SystemColorHighlightColor" />
139+
<StaticResource x:Key="TabViewItemHeaderPointerOverCloseButtonBackground" ResourceKey="SystemColorHighlightColor" />
140+
<StaticResource x:Key="TabViewItemHeaderSelectedCloseButtonBackground" ResourceKey="SystemColorHighlightColor" />
141+
<StaticResource x:Key="TabViewItemHeaderDisabledCloseButtonBackground" ResourceKey="SystemColorWindowColor" />
142+
<StaticResource x:Key="TabViewItemHeaderCloseButtonForeground" ResourceKey="SystemColorButtonTextColor" />
143+
<StaticResource x:Key="TabViewItemHeaderCloseButtonForegroundPressed" ResourceKey="SystemColorHighlightTextColor" />
144+
<StaticResource x:Key="TabViewItemHeaderCloseButtonForegroundPointerOver" ResourceKey="SystemColorHighlightTextColor" />
145+
<StaticResource x:Key="TabViewItemHeaderPressedCloseButtonForeground" ResourceKey="SystemColorButtonTextColor" />
146+
<StaticResource x:Key="TabViewItemHeaderPointerOverCloseButtonForeground" ResourceKey="SystemColorButtonTextColor" />
147+
<StaticResource x:Key="TabViewItemHeaderSelectedCloseButtonForeground" ResourceKey="SystemColorHighlightTextColor" />
148+
<StaticResource x:Key="TabViewItemHeaderDisabledCloseButtonForeground" ResourceKey="SystemColorHighlightTextColor" />
149149

150150
<!-- Note: These theme resources below are no longer used and might be removed in a future WinUI update. -->
151-
<StaticResource x:Key="TabViewButtonBackgroundActiveTab" ResourceKey="SystemControlTransparentBrush" />
152-
<StaticResource x:Key="TabViewButtonForegroundActiveTab" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
151+
<StaticResource x:Key="TabViewButtonBackgroundActiveTab" ResourceKey="SystemColorWindowBrush" />
152+
<StaticResource x:Key="TabViewButtonForegroundActiveTab" ResourceKey="SystemColorWindowTextBrush" />
153153

154154
<StaticResource x:Key="TabViewBorderBrush" ResourceKey="CardStrokeColorDefault" />
155155
<StaticResource x:Key="TabViewItemBorderBrush" ResourceKey="SubtleFillColorTransparentBrush" />

Files/UserControls/DataGridHeader.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929

3030
<Grid>
3131
<Button
32+
AutomationProperties.Name="{x:Bind Header, Mode=OneWay}"
3233
Command="{x:Bind Command}"
3334
CommandParameter="{x:Bind CommandParameter}"
3435
IsEnabled="{x:Bind CanBeSorted, Mode=OneWay}"
35-
AutomationProperties.Name="{x:Bind Header, Mode=OneWay}"
3636
Style="{StaticResource HeaderButtonStyle}">
3737
<Grid>
3838
<Grid.ColumnDefinitions>

Files/UserControls/MultitaskingControl/TabItem/TabItemControl.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<Frame
1313
x:Name="ContentFrame"
1414
CacheSize="0"
15-
IsNavigationStackEnabled="False"
15+
IsNavigationStackEnabled="False"
1616
Navigated="ContentFrame_Navigated" />
1717
</UserControl>

Files/UserControls/NavigationToolbar.xaml

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@
3131
<ResourceDictionary Source="/ResourceDictionaries/ToolbarButtonStyle.xaml" />
3232

3333
<ResourceDictionary>
34-
<LinearGradientBrush x:Key="ControlElevationBorderBrush" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,3">
35-
<LinearGradientBrush.RelativeTransform>
36-
<ScaleTransform CenterY="0.5" ScaleY="-1" />
37-
</LinearGradientBrush.RelativeTransform>
38-
<LinearGradientBrush.GradientStops>
39-
<GradientStop Offset="0" Color="{StaticResource ControlStrokeColorSecondary}" />
40-
<GradientStop Offset="1.0" Color="{StaticResource ControlStrokeColorDefault}" />
41-
</LinearGradientBrush.GradientStops>
42-
</LinearGradientBrush>
43-
4434
<Style x:Key="NavigationButtonNormalStyle" TargetType="Button">
4535
<Setter Property="Background" Value="{ThemeResource NavigationViewBackButtonBackground}" />
4636
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
@@ -327,56 +317,6 @@
327317
</Setter.Value>
328318
</Setter>
329319
</Style>
330-
<SolidColorBrush x:Key="SystemControlSplitterPointerOver" Color="{ThemeResource SystemBaseLowColor}" />
331-
<SolidColorBrush x:Key="SystemControlSplitterPressed" Color="{ThemeResource SystemBaseHighColor}" />
332-
<Style x:Key="GridSplitterStyle_Invisible" TargetType="Custom:GridSplitter">
333-
<Setter Property="IsTabStop" Value="True" />
334-
<Setter Property="UseSystemFocusVisuals" Value="True" />
335-
<Setter Property="HorizontalAlignment" Value="Stretch" />
336-
<Setter Property="VerticalAlignment" Value="Stretch" />
337-
<Setter Property="IsFocusEngagementEnabled" Value="True" />
338-
<Setter Property="MinWidth" Value="2" />
339-
<Setter Property="MinHeight" Value="16" />
340-
<Setter Property="Background" Value="{ThemeResource SystemControlHighlightChromeHighBrush}" />
341-
<Setter Property="GripperForeground" Value="{ThemeResource SystemControlForegroundAltHighBrush}" />
342-
<Setter Property="Template">
343-
<Setter.Value>
344-
<ControlTemplate TargetType="Custom:GridSplitter">
345-
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
346-
<ContentPresenter
347-
HorizontalContentAlignment="Stretch"
348-
VerticalContentAlignment="Stretch"
349-
Content="{TemplateBinding Element}" />
350-
<VisualStateManager.VisualStateGroups>
351-
<VisualStateGroup x:Name="GridSplitterStates">
352-
<VisualState x:Name="Normal" />
353-
</VisualStateGroup>
354-
</VisualStateManager.VisualStateGroups>
355-
</Grid>
356-
</ControlTemplate>
357-
</Setter.Value>
358-
</Setter>
359-
</Style>
360-
361-
<ResourceDictionary.ThemeDictionaries>
362-
<ResourceDictionary x:Key="Light">
363-
<RevealBorderBrush
364-
x:Key="TransparentGridRevealBorderBrush"
365-
FallbackColor="Transparent"
366-
TargetTheme="Light"
367-
Color="Transparent" />
368-
</ResourceDictionary>
369-
<ResourceDictionary x:Key="Dark">
370-
<RevealBorderBrush
371-
x:Key="TransparentGridRevealBorderBrush"
372-
FallbackColor="Transparent"
373-
TargetTheme="Dark"
374-
Color="Transparent" />
375-
</ResourceDictionary>
376-
<ResourceDictionary x:Key="HighContrast">
377-
<SolidColorBrush x:Key="TransparentGridRevealBorderBrush" Color="{ThemeResource SystemColorWindowTextColor}" />
378-
</ResourceDictionary>
379-
</ResourceDictionary.ThemeDictionaries>
380320
</ResourceDictionary>
381321
</ResourceDictionary.MergedDictionaries>
382322
</ResourceDictionary>

0 commit comments

Comments
 (0)