Skip to content

Commit 41479dc

Browse files
committed
Add HighContrast theme resources
1 parent 69491a6 commit 41479dc

14 files changed

Lines changed: 308 additions & 2 deletions

CollapseLauncher/XAMLs/MainApp/MainWindow.xaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,16 @@
251251
<StaticResource x:Key="WindowCaptionButtonStrokePressed"
252252
ResourceKey="CloseButtonStrokePressed" />
253253
</ResourceDictionary>
254+
<ResourceDictionary x:Key="HighContrast">
255+
<StaticResource x:Key="WindowCaptionButtonBackgroundPointerOver"
256+
ResourceKey="SystemColorHighlightColorBrush" />
257+
<StaticResource x:Key="WindowCaptionButtonBackgroundPressed"
258+
ResourceKey="SystemColorHighlightColorBrush" />
259+
<StaticResource x:Key="WindowCaptionButtonStrokePointerOver"
260+
ResourceKey="SystemColorHighlightTextColorBrush" />
261+
<StaticResource x:Key="WindowCaptionButtonStrokePressed"
262+
ResourceKey="SystemColorHighlightTextColorBrush" />
263+
</ResourceDictionary>
254264
<!-- ReSharper restore Xaml.StaticResourceNotResolved -->
255265
</ResourceDictionary.ThemeDictionaries>
256266
</ResourceDictionary>

CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@
572572
Margin="4,4"
573573
Padding="8"
574574
extension:UIElementExtensions.CursorType="Hand"
575-
BorderThickness="0"
576575
Click="OpenSocMedLink"
577576
Content="{Binding}"
578577
CornerRadius="12"

CollapseLauncher/XAMLs/MainApp/Pages/PluginManagerPage.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,14 @@
345345
<SolidColorBrush x:Key="ButtonBackgroundPressed"
346346
Color="#70FF0000" />
347347
</ResourceDictionary>
348+
<ResourceDictionary x:Key="HighContrast">
349+
<StaticResource x:Key="ButtonBackground"
350+
ResourceKey="SystemColorButtonFaceColorBrush" />
351+
<StaticResource x:Key="ButtonBackgroundPointerOver"
352+
ResourceKey="SystemColorHighlightColorBrush" />
353+
<StaticResource x:Key="ButtonBackgroundPressed"
354+
ResourceKey="SystemColorHighlightColorBrush" />
355+
</ResourceDictionary>
348356
<!-- ReSharper restore Xaml.StaticResourceNotResolved -->
349357
</ResourceDictionary.ThemeDictionaries>
350358
</ResourceDictionary>

CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,14 @@
843843
<SolidColorBrush x:Key="ButtonBackgroundPressed"
844844
Color="#70FF0000" />
845845
</ResourceDictionary>
846+
<ResourceDictionary x:Key="HighContrast">
847+
<StaticResource x:Key="ButtonBackground"
848+
ResourceKey="SystemColorButtonFaceColorBrush" />
849+
<StaticResource x:Key="ButtonBackgroundPointerOver"
850+
ResourceKey="SystemColorHighlightColorBrush" />
851+
<StaticResource x:Key="ButtonBackgroundPressed"
852+
ResourceKey="SystemColorHighlightColorBrush" />
853+
</ResourceDictionary>
846854
<!-- ReSharper restore Xaml.StaticResourceNotResolved -->
847855
</ResourceDictionary.ThemeDictionaries>
848856
</ResourceDictionary>

CollapseLauncher/XAMLs/Theme/Button/SocMedIconButton.xaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
Color="#77000000" />
1717
<SolidColorBrush x:Key="SolidColorBrushBackgroundDisabled"
1818
Color="#11000000" />
19+
<Thickness x:Key="SocMedButtonBorderThickness">0</Thickness>
1920
</ResourceDictionary>
2021
<ResourceDictionary x:Key="Light">
2122
<SolidColorBrush x:Key="SolidColorBrushForegroundTransparent"
@@ -28,6 +29,21 @@
2829
Color="#77FFFFFF" />
2930
<SolidColorBrush x:Key="SolidColorBrushBackgroundDisabled"
3031
Color="#11FFFFFF" />
32+
<Thickness x:Key="SocMedButtonBorderThickness">0</Thickness>
33+
</ResourceDictionary>
34+
<ResourceDictionary x:Key="HighContrast">
35+
<SolidColorBrush x:Key="SolidColorBrushForegroundTransparent"
36+
Color="Transparent" />
37+
<SolidColorBrush x:Key="SolidColorBrushBackgroundTransparent"
38+
Color="Transparent" />
39+
<StaticResource x:Key="SolidColorBrushBackgroundHover"
40+
ResourceKey="SystemColorHighlightColorBrush" />
41+
<StaticResource x:Key="SolidColorBrushBackgroundPressed"
42+
ResourceKey="SystemColorHighlightColorBrush" />
43+
<StaticResource x:Key="SolidColorBrushBackgroundDisabled"
44+
ResourceKey="SystemColorGrayTextColorBrush" />
45+
<StaticResource x:Key="SocMedButtonBorderThickness"
46+
ResourceKey="ButtonBorderThemeThickness" />
3147
</ResourceDictionary>
3248
</ResourceDictionary.ThemeDictionaries>
3349

@@ -39,7 +55,7 @@
3955
<Setter Property="BackgroundSizing" Value="InnerBorderEdge" />
4056
<Setter Property="Foreground" Value="{ThemeResource ButtonForeground}" />
4157
<Setter Property="BorderBrush" Value="{ThemeResource ButtonBorderBrush}" />
42-
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" />
58+
<Setter Property="BorderThickness" Value="{ThemeResource SocMedButtonBorderThickness}" />
4359
<Setter Property="Padding" Value="{ThemeResource ButtonPadding}" />
4460
<Setter Property="HorizontalAlignment" Value="Left" />
4561
<Setter Property="VerticalAlignment" Value="Center" />

CollapseLauncher/XAMLs/Theme/ContentDialog/ContentDialogCollapse.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
<Thickness x:Key="ContentDialogSeparatorThickness">0,0,0,1</Thickness>
3030
</ResourceDictionary>
3131
<ResourceDictionary x:Key="HighContrast">
32+
<SolidColorBrush x:Key="SmokeFillColorCollapseBrush"
33+
Opacity="0.8"
34+
Color="{ThemeResource SystemColorWindowColor}" />
3235
<StaticResource x:Key="ContentDialogForeground"
3336
ResourceKey="SystemColorWindowTextColorBrush" />
3437
<StaticResource x:Key="ContentDialogBackground"

CollapseLauncher/XAMLs/Theme/ContentDialog/ContentDialogOverlay.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
<Thickness x:Key="ContentDialogSeparatorThickness">0,0,0,1</Thickness>
3030
</ResourceDictionary>
3131
<ResourceDictionary x:Key="HighContrast">
32+
<SolidColorBrush x:Key="SmokeFillColorCollapseBrush"
33+
Opacity="0.8"
34+
Color="{ThemeResource SystemColorWindowColor}" />
3235
<StaticResource x:Key="ContentDialogForeground"
3336
ResourceKey="SystemColorWindowTextColorBrush" />
3437
<StaticResource x:Key="ContentDialogBackground"

CollapseLauncher/XAMLs/Theme/ContentDialog/UserFeedbackDialog.xaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@
4343
<StaticResource x:Key="SmokeGridOverlayBackground"
4444
ResourceKey="SmokeFillColorCollapseBrush" />
4545
</ResourceDictionary>
46+
<ResourceDictionary x:Key="HighContrast">
47+
<SolidColorBrush x:Key="AcrylicTitleGridBackground"
48+
Color="{ThemeResource SystemColorHighlightColor}" />
49+
<SolidColorBrush x:Key="AcrylicInputGridBackground"
50+
Color="{ThemeResource SystemColorWindowColor}" />
51+
<SolidColorBrush x:Key="AcrylicConfirmationGridBackground"
52+
Color="{ThemeResource SystemColorHighlightColor}" />
53+
<StaticResource x:Key="SmokeGridOverlayBackground"
54+
ResourceKey="SmokeFillColorCollapseBrush" />
55+
</ResourceDictionary>
4656
</ResourceDictionary.ThemeDictionaries>
4757

4858
<StaticResource x:Key="BackgroundBrush"

CollapseLauncher/XAMLs/Theme/CustomControls/FullPageOverlay.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
TintLuminosityOpacity="0.8"
2424
TintOpacity="0.0" />
2525
</ResourceDictionary>
26+
<ResourceDictionary x:Key="HighContrast">
27+
<SolidColorBrush x:Key="SmokeBackgroundBrush"
28+
Opacity="0.8"
29+
Color="{ThemeResource SystemColorWindowColor}" />
30+
<SolidColorBrush x:Key="ContentBackgroundAcrylicBrush"
31+
Color="{ThemeResource SystemColorWindowColor}" />
32+
</ResourceDictionary>
2633
</ResourceDictionary.ThemeDictionaries>
2734

2835
<StaticResource x:Key="BackgroundBrush"

CollapseLauncher/XAMLs/Theme/CustomControls/LayeredBackgroundImage.xaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<Grid x:Name="ElevateGrid"
3737
HorizontalAlignment="Stretch"
3838
VerticalAlignment="Stretch"
39+
Opacity="{ThemeResource LayeredBackgroundImageContentOpacity}"
3940
extension:UIElementExtensions.IsTranslationEnabled="True">
4041
<Grid x:Name="ParallaxGrid"
4142
HorizontalAlignment="Stretch"
@@ -64,6 +65,12 @@
6465
<BrushTransition Duration="0:0:0.2" />
6566
</Grid.BackgroundTransition>
6667
</Grid>
68+
<!-- Solid backdrop shown only in High Contrast mode, replaces the game background image -->
69+
<Grid x:Name="HighContrastBackdrop"
70+
HorizontalAlignment="Stretch"
71+
VerticalAlignment="Stretch"
72+
Background="{ThemeResource SystemColorWindowColorBrush}"
73+
Opacity="{ThemeResource LayeredBackgroundImageHighContrastBackdropOpacity}" />
6774
</Grid>
6875
</ControlTemplate>
6976
</Setter.Value>

0 commit comments

Comments
 (0)