wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.33k stars 515 forks source link

wx.TreeCtrl in dark mode on MacOS doesn't show correctly #2371

Open tianzhuqiao opened 1 year ago

tianzhuqiao commented 1 year ago

Operating system: 13.2.1 wxPython version & source: 4.2.0 Python version & source: 3.9.5

Description of the problem:

In dark mode (MacOS), wx.TreeCtrl doesn't show correctly near the bottom right corner when both horz/vert scrollbar are shown.

Screenshot 2023-04-05 at 6 47 57 PM
canmetan commented 1 year ago

Not an issue on linux FYI: image Also python 3.9 & wxPython 4.2.0. It could be related to your theming and not wxwidgets. Have you checked other applications? Do they have the same issue or no?

tianzhuqiao commented 1 year ago

Thanks @canmetan. Tried some other wxpython applications, it shows the same issue on my MacOS. And didn't see the same issue on non-wxpython applications (e.g., Finder, but I am also not sure they are using the treectrl).

canmetan commented 1 year ago

So the expected behavior for wxwidgets (and by extension wxpython) is for them to replicate a "native OS look and feel". While it is possible that this is a wxWidgets issue specifically on MacOS (I don't have the same issue on Linux with the exact same python and wxpython versions you are using), my money would be on the OS theming as you've had this on other applications as well.

Try changing to a different theme and give it a whirl. On linux there are applications that would show you a preview like this: image I'd expect mac to have better support for such stuff.

The glitched box you have there appears white. For instance change to a yellow or green colored theme and see if you still get a white box. The fix probably is just going to be a single hex value change in your theme file.