8000 fix: use effectiveAppearance to check dark mode on mojave and above by MarshallOfSound · Pull Request #18666 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 2 commits into from
Jun 7, 2019

Conversation

MarshallOfSound
Copy link
Member
@MarshallOfSound MarshallOfSound commented Jun 6, 2019

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 from effectiveAppearance 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

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jun 6, 2019
miniak
miniak previously requested changes Jun 6, 2019
Copy link
Contributor
@miniak miniak left a 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

@MarshallOfSound MarshallOfSound force-pushed the fix-tray-highlight-catalina branch from 8639a61 to 5a224ce Compare June 6, 2019 18:23
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jun 7, 2019
@codebytere codebytere requested a review from miniak June 7, 2019 17:42
@MarshallOfSound MarshallOfSound dismissed miniak’s stale review June 7, 2019 19:00

dismissing as the requested changes were just the CI build failure which has been fixed

@MarshallOfSound MarshallOfSound merged commit ad54d38 into master Jun 7, 2019
@release-clerk
Copy link
release-clerk bot commented Jun 7, 2019

Release Notes Persisted

Fixed issue on macOS Catalina where the tray icon would be highlighted incorrectly and sometimes invisible

@MarshallOfSound MarshallOfSound deleted the fix-tray-highlight-catalina branch June 7, 2019 19:01
@trop
Copy link
Contributor
trop bot commented Jun 7, 2019

I was unable to backport this PR to "6-0-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor
trop bot commented Jun 7, 2019

I was unable to backport this PR to "4-2-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor
trop bot commented Jun 7, 2019

I was unable to backport this PR to "5-0-x" cleanly;
you will need to perform this backport manually.

codebytere pushed a commit that referenced this pull request Jun 17, 2019
…18666)

* fix: use effectiveAppearance to check dark mode on mojave and above

* chore: add forward declarations for dark appearance
codebytere added a commit that referenced this pull request Jun 17, 2019
…18666) (#18845)

* fix: use effectiveAppearance to check dark mode on mojave and above

* chore: add forward declarations for dark appearance
trop bot pushed a commit that referenced this pull request Jun 17, 2019
…18666)

* fix: use effectiveAppearance to check dark mode on mojave and above

* chore: add forward declarations for dark appearance
trop bot pushed a commit that referenced this pull request Jun 17, 2019
…18666)

* fix: use effectiveAppearance to check dark mode on mojave and above

* chore: add forward declarations for dark appearance
@deepak1556
Copy link
Member

Chromium has unified dark mode detection for macOS and windows, we should try switching to the utilities in NativeTheme for this api https://bugs.chromium.org/p/chromium/issues/detail?id=893598

@codebytere
Copy link
Member

ooh interesting! @MarshallOfSound mind if I look into that?

codebytere pushed a commit that referenced this pull request Jun 18, 2019
…18666) (#18853)

* fix: use effectiveAppearance to check dark mode on mojave and above

* chore: add forward declarations for dark appearance
codebytere pushed a commit that referenced this pull request Jun 18, 2019
…18666) (#18852)

* fix: use effectiveAppearance to check dark mode on mojave and above

* chore: add forward declarations for dark appearance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tray icon becomes invisible when selecting "Auto" appearance in System Preferences on macOS 10.15 beta1
4 participants
0