-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
[High Contrast] Fix red SUI background #13083
Conversation
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.
Thanks! Can you go through and evaluate all of the settings pages for HC stuff as well? I know you probably did that already, but just in case. :)
@carlos-zamora FYI Mike is comfortable with us porting the new Win11 UI changes in the SUI and the Search/Command Palette if the HC things are fixed. Are you also comfortable with that? |
|
@msftbot merge this in 2 minutes |
Hello @DHowett! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
Fixes the SUI background being red in high contrast mode. The issue was that `SolidBackgroundFillColorTertiary` purposefully has a bad High Contrast color[^1]. The fix was to be explicit in the theme resources so that `SolidBackgroundFillColorTertiary` is used in light and dark mode, but the standard high contrast one is used in high contrast mode. Since the page is the top-level XAML element in the Editor project, I had to introduce this in the App.xaml resources so that the page can find the theme resource. Closes #13065 Closes #13070 [^1]: https://github.com/microsoft/microsoft-ui-xaml/blob/40df43a61c013a6763f47dd7d89ed54f35999340/dev/CommonStyles/Common_themeresources_any.xaml#L650-L651 (cherry picked from commit a657cb0) Service-Card-Id: 81805351 Service-Version: 1.13
ThemeResources are a persistent pain. Regressed in #13083. See also #12775 et. al. We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past. * [x] Fixes something we noticed right before shipping
ThemeResources are a persistent pain. Regressed in #13083. See also #12775 et. al. We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past. * [x] Fixes something we noticed right before shipping
ThemeResources are a persistent pain. Regressed in #13083. See also #12775 et. al. We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past. * [x] Fixes something we noticed right before shipping (cherry picked from commit bb03b00) Service-Card-Id: 82303612 Service-Version: 1.14
ThemeResources are a persistent pain. Regressed in #13083. See also #12775 et. al. We can't just put those here though as StaticResources, because XAML will evaluate their values when the App is first loaded, and we'll always use the value from the OS theme, regarless of the requested theme. Kinda the same thing we've had to do with TabViewBackground in the past. * [x] Fixes something we noticed right before shipping (cherry picked from commit bb03b00) Service-Card-Id: 82303611 Service-Version: 1.13
🎉 Handy links: |
🎉 Handy links: |
Fixes the SUI background being red in high contrast mode. The issue was
that
SolidBackgroundFillColorTertiary
purposefully has a bad HighContrast color1.
The fix was to be explicit in the theme resources so that
SolidBackgroundFillColorTertiary
is used in light and dark mode, butthe standard high contrast one is used in high contrast mode. Since the
page is the top-level XAML element in the Editor project, I had to
introduce this in the App.xaml resources so that the page can find the
theme resource.
Closes #13065
Closes #13070
Footnotes
https://github.com/microsoft/microsoft-ui-xaml/blob/40df43a61c013a6763f47dd7d89ed54f35999340/dev/CommonStyles/Common_themeresources_any.xaml#L650-L651 ↩