classification
Title: IDLE fix colours for MacOS dark mode
Type: behavior Stage: needs patch
Components: IDLE Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: epaine, taleinat, terry.reedy
Priority: normal Keywords: easy, newcomer friendly

Created on 2021-01-05 12:54 by epaine, last changed 2021-05-28 20:14 by taleinat.

Messages (3)
msg384391 - (view) Author: E. Paine (epaine) * Date: 2021-01-05 12:54
Currently IDLE, in some places, uses predefined colours which assume it is in light mode. However, on the new Universal2 installers (I tested using 3.10.0a4) this causes issues, where this can no longer be assumed.

Taking the "About IDLE" dialogue as an example, it appears in a light theme and most notably makes button text very hard to read (as this is changed to white). I propose, on macOS systems running Tk >=8.6.10, we try to switch these colours to the system colours described in https://github.com/tcltk/tk/blob/main/macosx/README (IMO, we would test colour availability and catch a TclError rather than specifying conditions ourselves). For the about dialogue I think we would, for example, replace `#bbbbbb` with one of the `systemWindowBackgroundColor`s.
msg384416 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-01-05 17:16
This might be related to #7949, about KDE/GTK dark themes.

In general, IDLE only controls colors for Shell and editor windows, leaving dialogs to system default.  This appears to be true for the settings and search dialogs. 'About' is unusual in having some colors specified.  I had nothing to do with that.  Would it work to just remove those specifications?  Otherwise, every widget should specify both foreground and background color.
msg384420 - (view) Author: E. Paine (epaine) * Date: 2021-01-05 17:55
I have also done a grep and believe the other affected parts from the user's perspective are the debugger (I haven't checked if Mark's version also suffers), the help dialog and hover tip (e.g. over the squeezer button).

> Would it work to just remove those specifications?

Almost certainly for the about dialog, though we would probably need to explicitly give the foreground colour for others (similar to what you did in PR 12262, I think)
History
Date User Action Args
2021-05-28 20:14:35taleinatsetkeywords: + easy, newcomer friendly
type: behavior
stage: needs patch
2021-01-05 17:55:57epainesetmessages: + msg384420
2021-01-05 17:16:29terry.reedysetmessages: + msg384416
2021-01-05 12:54:54epainecreate