Skip to content
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

Support Dark Mode in macOS #320

Closed
machawk1 opened this issue Oct 24, 2018 · 5 comments · Fixed by #469
Closed

Support Dark Mode in macOS #320

machawk1 opened this issue Oct 24, 2018 · 5 comments · Fixed by #469

Comments

@machawk1
Copy link
Owner

Requires wxPython support per wxWidgets/Phoenix#1020, slated for wxPython 4.1.

@machawk1
Copy link
Owner Author

Re-opening this ticket, as a user running WAIL in dark mode is problematic:

Screen Shot 2019-08-28 at 9 49 11 PM

@machawk1 machawk1 reopened this Aug 29, 2019
@machawk1
Copy link
Owner Author

The darkdetect module provides a way to determine the mode, which would allow us to manually change the coloration (at least to be legible) until wxPython supports it.

@machawk1
Copy link
Owner Author

https://wxpython.org/Phoenix/docs/html/wx.SystemAppearance.html introduced in wxPython 4.1 (April 2020) introduces ability to read the system state re:dark mode but not set it for Windows. Building using this version of wxPython while in dark mode still results in a light-colored window.

@machawk1 machawk1 changed the title Support Dark Mode in macOS 10.14 Support Dark Mode in macOS Jul 14, 2020
@machawk1
Copy link
Owner Author

machawk1 commented Jul 21, 2020

I am unable to replicate the above issue on August 28, 2019 on macOS 10.15.5 from the latest release version 0.2019.05.21.

Screen Shot 2020-07-21 at 1 12 22 PM

EDIT: Similar effect when building from the latest primary (osagnostic) branch, f27f91e, so perhaps it was a bug with the imported modules or OS at the time.

Screen Shot 2020-07-21 at 1 17 34 PM

@machawk1
Copy link
Owner Author

On macOS, setting

	<key>NSRequiresAquaSystemAppearance</key>
	<false/>

makes an app "dark mode aware". Doing this with the .app built from source (above), makes the UI visually adaptive.

Screen Shot 2020-07-21 at 1 54 46 PM

So, despite explicit support for a flag in wxPython, this can likely be manually set in the .plist that is copied over in the build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant