-
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
Fix High Contrast mode in Command Palette #18132
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.
Nicely done! Can you validate this on W10 as well? Different resource names maybe...
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.
I do not like XAML
I do not like it, Sam I Am
Validated on 22H2 19045.5073 |
Turns out that having the styles for the KeyChordText and ParsedCommandLineText be empty for high contrast mode caused the issue. Since we're already using theme resources for the colors, we automatically adjust properly to whatever the high contrast theme is (Thanks XAML!). Bonus points: - we didn't need the theme dictionaries anymore, so I just moved them to the ResourceDictionary directly - ParsedCommandLineTextBlockStyle isn't used. So I removed it altogether. Validated command palette with multiple high contrast themes. See PR thread for demo. Closes #17914 (cherry picked from commit e83434f) Service-Card-Id: PVTI_lADOAF3p4s4AmhmszgUZ6Mk Service-Version: 1.21
Turns out that having the styles for the KeyChordText and ParsedCommandLineText be empty for high contrast mode caused the issue. Since we're already using theme resources for the colors, we automatically adjust properly to whatever the high contrast theme is (Thanks XAML!). Bonus points: - we didn't need the theme dictionaries anymore, so I just moved them to the ResourceDictionary directly - ParsedCommandLineTextBlockStyle isn't used. So I removed it altogether. Validated command palette with multiple high contrast themes. See PR thread for demo. Closes #17914 (cherry picked from commit e83434f) Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgUZ6Mo Service-Version: 1.22
Turns out that having the styles for the KeyChordText and ParsedCommandLineText be empty for high contrast mode caused the issue. Since we're already using theme resources for the colors, we automatically adjust properly to whatever the high contrast theme is (Thanks XAML!).
Bonus points:
Validated command palette with multiple high contrast themes. See PR thread for demo.
Closes #17914