UI text unreadable in MacOS with Dark theme
Closed this issue · 3 comments
Unfortunately reliable automatic 'dark mode' detection across different O/S platforms is problematic (though not impossible) with tkinter. There are libraries available e.g. darkdetect, but AFAICS they're not yet fully mature.
The easiest way to address this (from an application standpoint) would be to add a user-selectable colormode option to the application itself, via the new json config file facility introduced in v1.3.22, e.g:
{
...
"colormode": "dark"
...
}
The font colours would then be amended accordingly.
Would that be an acceptable solution?
As an interim workaround, you could amend the following values in globals.py:
BGCOL = "gray24" # default widget background color
FGCOL = "white" # default widget foreground color
(As it happens I normally run in 'Dark' mode on Windows and Linux but reverted to 'Light' on my Mac as too many off-the-shelf applications didn't seem to play well with 'Dark' mode.)
Yep, that's what I was looking for, thanks
Yep, that's what I was looking for, thanks
Actually, on further investigation, the issue is simply that I'm setting an explicit background colour in the Settings panel widgets, but not an explicit foreground color. If I specify neither, the application can respond dynamically to Light and Dark mode on MacOS:
Note that 'Dark' mode works differently on Windows and Linux, but in all cases the text will now be legible.