-
Notifications
You must be signed in to change notification settings - Fork 697
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
teaP
merged 12 commits into
microsoft:master
from
marcelwgn:user/chingucoding/update-acrylicbrushes
Nov 24, 2020
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f72a4dc
Add new brushes, update CommandbarFlyout and NavigationView to use ne…
marcelwgn 130eed9
Update brushes
marcelwgn 0dfb532
Update brush references
marcelwgn b2596b1
Merge branch 'master' into user/chingucoding/update-acrylicbrushes
marcelwgn c0cc255
Update project file
marcelwgn f812de2
Update navigationview resources
marcelwgn d5c9997
Merge branch 'master' into user/chingucoding/update-acrylicbrushes
marcelwgn e430e95
Hacky workaround XAML compiler bug
marcelwgn bc6a467
Add check
marcelwgn 9676d32
Merge branch 'master' into user/chingucoding/update-acrylicbrushes
marcelwgn fe39ee2
Add comment
marcelwgn af3a992
Fix typo
marcelwgn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
dev/Materials/Acrylic/AcrylicBrush_19h1_themeresources.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<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"> | ||
|
||
<!-- | ||
Due to a low level compiler bug, setting nullable doubles does not work on all platforms. | ||
Because of that, TintLuminosityOpacity will be set through code behind when loading these brushes. | ||
This is being done in XAMLControlsResources.cpp . | ||
--> | ||
<ResourceDictionary.ThemeDictionaries> | ||
<ResourceDictionary x:Key="Default"> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlTransientBackgroundBrush" | ||
TintColor="#2C2C2C" | ||
TintOpacity="0.15" | ||
FallbackColor="#2C2C2C" | ||
BackgroundSource="HostBackdrop"/> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlTransientAcrylicElementBrush" | ||
TintColor="#2C2C2C" | ||
TintOpacity="0.15" | ||
FallbackColor="#2C2C2C" | ||
BackgroundSource="Backdrop"/> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlTransientBackgroundInverseBrush" | ||
TintColor="#FCFCFC" | ||
TintOpacity="0.0" | ||
FallbackColor="#FCFCFC" | ||
BackgroundSource="HostBackdrop"/> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlBaseAcrylicBrush" | ||
TintColor="#202020" | ||
TintOpacity="0.0" | ||
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" | ||
FallbackColor="#FCFCFC" | ||
BackgroundSource="HostBackdrop"/> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlTransientAcrylicElementBrush" | ||
TintColor="#FCFCFC" | ||
TintOpacity="0.0" | ||
FallbackColor="#FCFCFC" | ||
BackgroundSource="Backdrop"/> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlTransientBackgroundInverseBrush" | ||
TintColor="#2C2C2C" | ||
TintOpacity="0.15" | ||
FallbackColor="#2C2C2C" | ||
BackgroundSource="HostBackdrop"/> | ||
<local:AcrylicBrush | ||
x:Key="SystemControlBaseAcrylicBrush" | ||
TintColor="#F3F3F3" | ||
TintOpacity="0.0" | ||
FallbackColor="#F3F3F3" | ||
BackgroundSource="HostBackdrop"/> | ||
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="#FFFFFF" Opacity="0.5"/> | ||
</ResourceDictionary> | ||
|
||
<ResourceDictionary x:Key="HighContrast"> | ||
<SolidColorBrush x:Key="SystemControlTransientBackgroundBrush" Color="{ThemeResource SystemColorWindowColor}"/> | ||
<SolidColorBrush x:Key="SystemControlTransientAcrylicElementBrush" Color="{ThemeResource SystemColorWindowColor}"/> | ||
<SolidColorBrush x:Key="SystemControlTransientBackgroundInverseBrush" Color="{ThemeResource SystemColorWindowTextColor}" /> | ||
<SolidColorBrush x:Key="SystemControlBaseAcrylicBrush" Color="{ThemeResource SystemColorWindowColor}"/> | ||
<SolidColorBrush x:Key="SystemControlDefaultBrighteningBrush" Color="{ThemeResource SystemColorWindowColor}"/> | ||
</ResourceDictionary> | ||
|
||
</ResourceDictionary.ThemeDictionaries> | ||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a 19H1+ condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TintLuminosityOpacity is only present on 19H1+ and we also have a separate themeresources file because of that. To not interfere with the RS5- brushes and save performance, we are only updating the brushes when on 19H1+. Of course, we could run it in every case as the MUXC brushes guard against it but we don't need to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment in the 19h1 theme resource file that tint opacity is being set in code ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, added a comment for that. Can you rerun CI @ranjeshj ?