How to disable Dark Mode?

I’m working on an app that does not need to acknowledge “dark mode” by spec. I’ve corrected most of the controls, but wxButtons do not seem to allow me to change the text color (or at least I am failing to find the method to do that because SetForegroundColor seems to have no effect).

Is there a workaround for this? I’ve been Googling for an hour or so in addition to pouring over the docs. I’m stumped. :man_shrugging:

Platform and wxPython version?

MacOS Catalina (10.15.3)

wxPython-4.0.7.post2-cp37-cp37m-macosx_10_9_x86_64.whl

Interesting, I want to enable a “dark mode” and it seems the only reference online to implement it is for ListCtrl, not the whole GUI:

Can you share some code?

I can understand the desire to not worry about the system dark mode and just do things with the normal colors and styles. Keep in mind though that your user is the one who decided that they wanted to use dark mode, and forcibly ignoring that could be perceived as saying that you don’t care about your users.

OSX dark mode is better supported in wxPython 4.1. There will be an official release soon, but in the meantime you can get snapshot builds from https://wxpython.org/Phoenix/snapshot-builds/. You can either download an appropriate wheel file from there, or you can have pip download and install it with a command like this (for Windows or macOS):

pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython

Remember that this is not a released version, but lots of people are using it already.

I understand what you’re saying. However, if the buttons become unreadable then my user is done an even greater disservice. :man_shrugging:

I’ll try the pre-release tonight and see how it goes.