Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Default Application Selector styles for high contrast and to change with OS theme dark/light toggle #10185

Merged
2 commits merged into from
May 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/cascadia/TerminalSettingsEditor/CommonResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,29 @@
<ResourceDictionary Source="SettingContainerStyle.xaml" />
</ResourceDictionary.MergedDictionaries>

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<Style
x:Key="SecondaryTextBlockStyle"
TargetType="TextBlock">
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
</Style>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<Style
x:Key="SecondaryTextBlockStyle"
TargetType="TextBlock">
<Setter Property="Foreground" Value="{ThemeResource SystemBaseMediumColor}" />
</Style>
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<Style
x:Key="SecondaryTextBlockStyle"
TargetType="TextBlock"/>
<!-- Do not mess with the foreground color for High Contrast. Let it ride as is.-->
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

<x:Double x:Key="StandardIconSize">14.0</x:Double>
<Thickness x:Key="StandardIndentMargin">13,0,0,0</Thickness>
<Thickness x:Key="StandardControlMargin">0,24,0,0</Thickness>
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/Launch.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@

<TextBlock Grid.Row="1"
Grid.Column="1"
Foreground="{StaticResource SystemBaseMediumColor}"
Style="{ThemeResource SecondaryTextBlockStyle}"
Text="{x:Bind Author}" />

<TextBlock Grid.Row="1"
Grid.Column="2"
Foreground="{StaticResource SystemBaseMediumColor}"
Style="{ThemeResource SecondaryTextBlockStyle}"
Text="{x:Bind Version}" />

</Grid>
Expand Down