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

Update AcrylicBrushes and add new AcrylicBrushes #3498

Merged
2 changes: 1 addition & 1 deletion dev/CommandBarFlyout/CommandBarFlyout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)">

<Style x:Key="DefaultCommandBarFlyoutCommandBarStyle" TargetType="local:CommandBarFlyoutCommandBar">
<Setter Property="Background" Value="{ThemeResource SystemControlAcrylicElementBrush}" />
<Setter Property="Background" Value="{ThemeResource SystemControlTransientAcrylicElementBrush}" />
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="BorderBrush" Value="{ThemeResource SystemControlTransientBorderBrush}" />
<Setter Property="BorderThickness" Value="{ThemeResource CommandBarFlyoutBorderThemeThickness}" />
Expand Down
5 changes: 5 additions & 0 deletions dev/Materials/Acrylic/AcrylicBrush.vcxitems
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<Image Include="$(MSBuildThisFileDirectory)Assets\NoiseAsset_256X256_PNG.png" />
</ItemGroup>
<ItemGroup>
<Page Include="$(MSBuildThisFileDirectory)AcrylicBrush_19h1_themeresources.xaml">
<Version>19H1</Version>
<Type>ThemeResources</Type>
<Priority>2</Priority>
</Page>
<Page Include="$(MSBuildThisFileDirectory)AcrylicBrush_rs1_themeresources.xaml">
<Version>RS1</Version>
<Type>ThemeResources</Type>
Expand Down
80 changes: 80 additions & 0 deletions dev/Materials/Acrylic/AcrylicBrush_19h1_themeresources.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.UI.Xaml.Media">

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundBrush"
TintColor="#2C2C2C"
TintOpacity="0.15"
TintLuminosityOpacity="0.96"
FallbackColor="#2C2C2C"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientAcrylicElementBrush"
TintColor="#2C2C2C"
TintOpacity="0.15"
TintLuminosityOpacity="0.96"
FallbackColor="#2C2C2C"
BackgroundSource="Backdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundInverseBrush"
TintColor="#FCFCFC"
TintOpacity="0.0"
TintLuminosityOpacity="0.85"
FallbackColor="#FCFCFC"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlBaseAcrylicBrush"
TintColor="#202020"
TintOpacity="0.0"
TintLuminosityOpacity="0.96"
FallbackColor="#202020"
BackgroundSource="HostBackdrop"/>
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.0419"/>
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundBrush"
TintColor="#FCFCFC"
TintOpacity="0.0"
TintLuminosityOpacity="0.85"
FallbackColor="#FCFCFC"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientAcrylicElementBrush"
TintColor="#FCFCFC"
TintOpacity="0.0"
TintLuminosityOpacity="0.85"
FallbackColor="#FCFCFC"
BackgroundSource="Backdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundInverseBrush"
TintColor="#2C2C2C"
TintOpacity="0.15"
FallbackColor="#2C2C2C"
TintLuminosityOpacity="0.96"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlBaseAcrylicBrush"
TintColor="#F3F3F3"
TintOpacity="0.0"
TintLuminosityOpacity="0.9"
FallbackColor="#F3F3F3"
BackgroundSource="HostBackdrop"/>
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.5"/>
</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="SystemControlTransientBackgroundBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientAcrylicElementBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientBackgroundInverseBrush" ResourceKey="SystemBaseMediumHighColor" />
<StaticResource x:Key="SystemControlBaseAcrylicBrush" ResourceKey="SystemChromeMediumLowColor" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@teaP this is a question for you. I see that in our existing RS2 file, we set

<StaticResource x:Key="SystemControlTransientBackgroundBrush" ResourceKey="SystemChromeMediumLowColor" />

This surprised me, as I expected a direct reference to one of the 8 HC colors, instead of added indirection. Should these HC definitions follow the other pattern in the same RS2 file?

<SolidColorBrush x:Key="SystemControlAltHighAcrylicElementBrush" Color="{ThemeResource SystemColorWindowColor}" />

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on our conversation earlier today, I think we want to be as direct as possible, so reference the HC colors directly instead of going through SystemChromeMediumLowColor or similar.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the all resources modified by the feature proposal and also updated the SystemControlTransientBackgroundBrush as it also didn't reference a HC brush.

<StaticResource x:Key="SystemControlDefaultBrighteningBrush" ResourceKey="SystemChromeWhiteColor"/>
</ResourceDictionary>

</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
12 changes: 12 additions & 0 deletions dev/Materials/Acrylic/AcrylicBrush_rs1_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
<SolidColorBrush x:Key="SystemControlAltHighAcrylicElementBrush" Color="{StaticResource SystemAltHighColor}" />
<SolidColorBrush x:Key="SystemControlTransientBorderBrush" Color="#000000" Opacity="0.36" />
<StaticResource x:Key="SystemControlTransientBackgroundBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientAcrylicElementBrush" ResourceKey="SystemChromeMediumLowColor" />
<SolidColorBrush x:Key="SystemControlTransientBackgroundInverseBrush" Color="#F2F2F2" />
<StaticResource x:Key="SystemControlBaseAcrylicBrush" ResourceKey="SystemChromeMediumLowColor" />
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.0419"/>
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
Expand Down Expand Up @@ -89,6 +93,10 @@
<SolidColorBrush x:Key="SystemControlAltHighAcrylicElementBrush" Color="{StaticResource SystemAltHighColor}" />
<SolidColorBrush x:Key="SystemControlTransientBorderBrush" Color="#000000" Opacity="0.14" />
<StaticResource x:Key="SystemControlTransientBackgroundBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientAcrylicElementBrush" ResourceKey="SystemChromeMediumLowColor" />
<SolidColorBrush x:Key="SystemControlTransientBackgroundInverseBrush" Color="#2B2B2B" />
<StaticResource x:Key="SystemControlBaseAcrylicBrush" ResourceKey="SystemChromeMediumLowColor" />
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.5"/>
</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
Expand Down Expand Up @@ -132,6 +140,10 @@
<SolidColorBrush x:Key="SystemControlAltHighAcrylicElementBrush" Color="{ThemeResource SystemColorWindowColor}" />
<StaticResource x:Key="SystemControlTransientBorderBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
<StaticResource x:Key="SystemControlTransientBackgroundBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientAcrylicElementBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientBackgroundInverseBrush" ResourceKey="SystemBaseMediumHighColor" />
<StaticResource x:Key="SystemControlBaseAcrylicBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlDefaultBrighteningBrush" ResourceKey="SystemChromeWhiteColor"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

Expand Down
55 changes: 49 additions & 6 deletions dev/Materials/Acrylic/AcrylicBrush_rs2_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,29 @@
<SolidColorBrush x:Key="SystemControlTransientBorderBrush" Color="#000000" Opacity="0.36" />
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundBrush"
BackgroundSource="HostBackdrop"
TintColor="{StaticResource SystemChromeAltHighColor}"
TintColor="#1C1C1C"
TintOpacity="0.8"
FallbackColor="{StaticResource SystemChromeMediumLowColor}" />
FallbackColor="#2C2C2C"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientAcrylicElementBrush"
TintColor="#1C1C1C"
TintOpacity="0.8"
FallbackColor="#2C2C2C"
BackgroundSource="Backdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundInverseBrush"
TintColor="#FCFCFC"
TintOpacity="0.8"
FallbackColor="#FCFCFC"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlBaseAcrylicBrush"
TintColor="#1C1C1C"
TintOpacity="0.8"
FallbackColor="#202020"
BackgroundSource="HostBackdrop"/>
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.0419"/>
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
Expand Down Expand Up @@ -435,10 +454,30 @@
<SolidColorBrush x:Key="SystemControlTransientBorderBrush" Color="#000000" Opacity="0.14" />
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundBrush"
BackgroundSource="HostBackdrop"
TintColor="{StaticResource SystemChromeAltHighColor}"
TintColor="#FCFCFC"
TintOpacity="0.8"
FallbackColor="{StaticResource SystemChromeMediumLowColor}" />
FallbackColor="#FCFCFC"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientAcrylicElementBrush"
TintColor="#FCFCFC"
TintOpacity="0.8"
FallbackColor="#FCFCFC"
BackgroundSource="Backdrop"/>
<local:AcrylicBrush
x:Key="SystemControlTransientBackgroundInverseBrush"
TintColor="#1C1C1C"
TintOpacity="0.8"
FallbackColor="#202020"
BackgroundSource="HostBackdrop"/>
<local:AcrylicBrush
x:Key="SystemControlBaseAcrylicBrush"
TintColor="#F3F3F3"
TintOpacity="0.8"
FallbackColor="#F3F3F3"
BackgroundSource="HostBackdrop"/>
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.5"/>

</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
Expand Down Expand Up @@ -482,6 +521,10 @@
<SolidColorBrush x:Key="SystemControlAltHighAcrylicElementBrush" Color="{ThemeResource SystemColorWindowColor}" />
<StaticResource x:Key="SystemControlTransientBorderBrush" ResourceKey="SystemControlForegroundChromeHighBrush" />
<StaticResource x:Key="SystemControlTransientBackgroundBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientAcrylicElementBrush" ResourceKey="SystemChromeMediumLowColor" />
<StaticResource x:Key="SystemControlTransientBackgroundInverseBrush" ResourceKey="SystemBaseMediumHighColor" />
<StaticResource x:Key="SystemControlBaseAcrylicBrush" ResourceKey="SystemChromeMediumLowColor" />
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="{ThemeResource SystemChromeWhiteColor}"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

Expand Down
12 changes: 6 additions & 6 deletions dev/NavigationView/NavigationView_rs1_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Dark">
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemChromeMediumColor" />
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemControlTransientAcrylicElementBrush" />
ranjeshj marked this conversation as resolved.
Show resolved Hide resolved
<StaticResource x:Key="NavigationViewExpandedPaneBackground" ResourceKey="SystemChromeMediumColor" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemChromeMediumHighColor" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemControlTransientAcrylicElementBrush" />

<StaticResource x:Key="NavigationViewItemBackground" ResourceKey="SystemControlTransparentBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
Expand Down Expand Up @@ -83,9 +83,9 @@
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemChromeMediumColor" />
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemControlTransientAcrylicElementBrush" />
<StaticResource x:Key="NavigationViewExpandedPaneBackground" ResourceKey="SystemChromeMediumColor" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemChromeMediumHighColor" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemControlTransientAcrylicElementBrush" />

<StaticResource x:Key="NavigationViewItemBackground" ResourceKey="SystemControlTransparentBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
Expand Down Expand Up @@ -154,9 +154,9 @@
</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemChromeMediumColor" />
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemControlTransientAcrylicElementBrush" />
<StaticResource x:Key="NavigationViewExpandedPaneBackground" ResourceKey="SystemColorWindowColor" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemChromeMediumHighColor" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemControlTransientAcrylicElementBrush" />

<StaticResource x:Key="NavigationViewItemBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowBrush" />
Expand Down
9 changes: 0 additions & 9 deletions dev/NavigationView/NavigationView_rs2_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemControlAcrylicElementBrush" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemControlChromeMediumLowAcrylicElementMediumBrush" />

ranjeshj marked this conversation as resolved.
Show resolved Hide resolved
<StaticResource x:Key="NavigationViewItemBackground" ResourceKey="SystemControlTransparentRevealBackgroundBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowRevealBackgroundBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="SystemControlHighlightListMediumRevealBackgroundBrush" />
Expand Down Expand Up @@ -44,9 +41,6 @@
</ResourceDictionary>

<ResourceDictionary x:Key="Light">
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemControlAcrylicElementBrush" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemControlChromeMediumLowAcrylicElementMediumBrush" />

<StaticResource x:Key="NavigationViewItemBackground" ResourceKey="SystemControlTransparentRevealBackgroundBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowRevealBackgroundBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="SystemControlHighlightListMediumRevealBackgroundBrush" />
Expand Down Expand Up @@ -79,9 +73,6 @@
</ResourceDictionary>

<ResourceDictionary x:Key="HighContrast">
<StaticResource x:Key="NavigationViewDefaultPaneBackground" ResourceKey="SystemControlAcrylicElementBrush" />
<StaticResource x:Key="NavigationViewTopPaneBackground" ResourceKey="SystemControlChromeMediumLowAcrylicElementMediumBrush" />

<StaticResource x:Key="NavigationViewItemBackground" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPointerOver" ResourceKey="SystemControlHighlightListLowRevealBackgroundBrush" />
<StaticResource x:Key="NavigationViewItemBackgroundPressed" ResourceKey="SystemControlHighlightListMediumRevealBackgroundBrush" />
Expand Down