-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: use effectiveAppearance to check dark mode on mojave and above #18666
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
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.
../../electron/atom/browser/ui/tray_icon_cocoa.mm:150:47: error: property 'effectiveAppearance' not found on object of type '__kindof NSApplication *'
return [[NSApplication sharedApplication].effectiveAppearance.name
8639a61
to
5a224ce
Compare
dismissing as the requested changes were just the CI build failure which has been fixed
Release Notes Persisted
|
I was unable to backport this PR to "6-0-x" cleanly; |
I was unable to backport this PR to "4-2-x" cleanly; |
I was unable to backport this PR to "5-0-x" cleanly; |
…18666) * fix: use effectiveAppearance to check dark mode on mojave and above * chore: add forward declarations for dark appearance
…18666) * fix: use effectiveAppearance to check dark mode on mojave and above * chore: add forward declarations for dark appearance
…18666) * fix: use effectiveAppearance to check dark mode on mojave and above * chore: add forward declarations for dark appearance
Chromium has unified dark mode detection for macOS and windows, we should try switching to the utilities in |
ooh interesting! @MarshallOfSound mind if I look into that? |
Fixes #18663
So on Catalina there is a new "auto" mode that doesn't update the user pref but does update
effectiveAppearance
. The correct thing to do here is read it fromeffectiveAppearance
anyway so let's just do that.In the future I plan on doing #18664 but this is a solution for all our maintained versions 👍
Notes: Fixed issue on macOS Catalina where the tray icon would be highlighted incorrectly and sometimes invisible