-
-
Notifications
You must be signed in to change notification settings - Fork 874
Fixes wrong accent colors #1492
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
base: main
Are you sure you want to change the base?
Conversation
UiApplication.Current.Resources["SystemAccentBrush"] = systemAccent.ToBrush(); | ||
UiApplication.Current.Resources["SystemFillColorAttentionBrush"] = secondaryAccent.ToBrush(); | ||
UiApplication.Current.Resources["AccentTextFillColorPrimaryBrush"] = tertiaryAccent.ToBrush(); | ||
|
||
UiApplication.Current.Resources["AccentTextFillColorPrimaryBrush"] = secondaryAccent.ToBrush(); | ||
UiApplication.Current.Resources["AccentTextFillColorSecondaryBrush"] = tertiaryAccent.ToBrush(); | ||
UiApplication.Current.Resources["AccentTextFillColorTertiaryBrush"] = secondaryAccent.ToBrush(); | ||
UiApplication.Current.Resources["AccentFillColorSelectedTextBackgroundBrush"] = | ||
systemAccent.ToBrush(); | ||
UiApplication.Current.Resources["AccentFillColorDefaultBrush"] = secondaryAccent.ToBrush(); | ||
UiApplication.Current.Resources["AccentTextFillColorTertiaryBrush"] = primaryAccent.ToBrush(); | ||
|
||
UiApplication.Current.Resources["AccentFillColorSelectedTextBackgroundBrush"] = systemAccent.ToBrush(); |
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.
These were set all wrong. I've corrected them as per https://github.com/microsoft/microsoft-ui-xaml/blob/main/src/controls/dev/CommonStyles/Common_themeresources_any.xaml.
@@ -8,16 +8,16 @@ | |||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |||
|
|||
<!-- Colors depending on the theme should be changed by the Manager --> | |||
<Color x:Key="SystemAccentColor">#3379d9</Color> | |||
<Color x:Key="SystemAccentColor">#0078d4</Color> |
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.
This is based on Windows' Blue default accent color.
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
The current brushes are all wrong and don't match with WinUI:

Fixes: #1481
What is the new behavior?
Gets the correct brushes from Windows. I also improved the fallback colors (still not perfect, but better).
WinUI gallery original colors (now WPF-UI has the same colors):
