Skip to content

Commit a657cb0

Browse files
[High Contrast] Fix red SUI background (#13083)
Fixes the SUI background being red in high contrast mode. The issue was that `SolidBackgroundFillColorTertiary` purposefully has a bad High Contrast color[^1]. The fix was to be explicit in the theme resources so that `SolidBackgroundFillColorTertiary` is used in light and dark mode, but the standard high contrast one is used in high contrast mode. Since the page is the top-level XAML element in the Editor project, I had to introduce this in the App.xaml resources so that the page can find the theme resource. Closes #13065 Closes #13070 [^1]: https://github.com/microsoft/microsoft-ui-xaml/blob/40df43a61c013a6763f47dd7d89ed54f35999340/dev/CommonStyles/Common_themeresources_any.xaml#L650-L651
1 parent d137d3f commit a657cb0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/cascadia/TerminalApp/App.xaml

+8
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@
154154
<StaticResource x:Key="UnfocusedBorderBrush"
155155
ResourceKey="ApplicationPageBackgroundThemeBrush" />
156156

157+
<StaticResource x:Key="SettingsPageBackground"
158+
ResourceKey="SolidBackgroundFillColorTertiary" />
157159

158160
</ResourceDictionary>
159161

@@ -168,6 +170,9 @@
168170

169171
<StaticResource x:Key="UnfocusedBorderBrush"
170172
ResourceKey="ApplicationPageBackgroundThemeBrush" />
173+
174+
<StaticResource x:Key="SettingsPageBackground"
175+
ResourceKey="SolidBackgroundFillColorTertiary" />
171176
</ResourceDictionary>
172177

173178
<ResourceDictionary x:Key="HighContrast">
@@ -185,6 +190,9 @@
185190
-->
186191
<StaticResource x:Key="TabViewBackground"
187192
ResourceKey="SystemColorButtonFaceColorBrush" />
193+
194+
<StaticResource x:Key="SettingsPageBackground"
195+
ResourceKey="SystemColorWindowColorBrush" />
188196
</ResourceDictionary>
189197

190198
</ResourceDictionary.ThemeDictionaries>

src/cascadia/TerminalSettingsEditor/MainPage.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xmlns:local="using:Microsoft.Terminal.Settings.Editor"
1010
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1111
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
12-
Background="{ThemeResource SolidBackgroundFillColorTertiary}"
12+
Background="{ThemeResource SettingsPageBackground}"
1313
mc:Ignorable="d">
1414

1515
<Page.Resources>

0 commit comments

Comments
 (0)