feat: detect high contrast color mode (#15493)
* feat: add event and method to detect high contrast color mode * docs: add docs for isHighContrastColorScheme and high-contrast-color-scheme-changed * refactor: correct type of contrast
This commit is contained in:
parent
aa6f7a5d9f
commit
6d2a088be9
4 changed files with 54 additions and 5 deletions
|
@ -98,6 +98,7 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences>
|
|||
#endif
|
||||
bool IsDarkMode();
|
||||
bool IsInvertedColorScheme();
|
||||
bool IsHighContrastColorScheme();
|
||||
|
||||
protected:
|
||||
explicit SystemPreferences(v8::Isolate* isolate);
|
||||
|
@ -139,6 +140,8 @@ class SystemPreferences : public mate::EventEmitter<SystemPreferences>
|
|||
|
||||
bool invertered_color_scheme_;
|
||||
|
||||
bool high_contrast_color_scheme_;
|
||||
|
||||
std::unique_ptr<gfx::ScopedSysColorChangeListener> color_change_listener_;
|
||||
#endif
|
||||
DISALLOW_COPY_AND_ASSIGN(SystemPreferences);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue