-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[AppTheme] Add high contrast properties and events #2697
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
[AppTheme] Add high contrast properties and events #2697
Conversation
marlenecota
left a comment
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.
🕐
|
|
||
| bool AppTheme::getIsHighContrast() | ||
| { | ||
| return m_accessibilitySettings.HighContrast();; |
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.
; [](start = 48, length = 1)
nit: extra semicolon
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.
Shoot, merged before the page fully loaded. Will fix this on next PR.
kmelmon
left a comment
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.
![]()
Adding in High Contrast awareness for React Native.
Adds High contrast event to the AppTheme module. Provides awareness of the 'isHighContrast' Boolean and 'highContrastColors' which are the RGB hex values for the eight main system colors from Windows:
ButtonFace
ButtonText
GrayText
Highlight
HighlightText
Hotlight
Window
WindowText
These are sent via the highContrastChanged event as strings of the form "#FFFFFF", matching conventional RGB color values for React Native.
Examples are also added to AccessibilityExample.tsx.
This PR also includes the addition of ThemingExample.tsx which adds an example of usage for the light and dark theme awareness from the AppTheme module.
Microsoft Reviewers: Open in CodeFlow