Skip to content

gh-86997: Fix IDLE widget colors in macOS dark mode - #157679

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-86997-dark-colors
Open

serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-86997-dark-colors

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

On macOS, Tk takes the default widget colors from the system, so a widget with only one hard-coded color gets the other one for the opposite appearance, and the text becomes unreadable in dark mode. Four such places were found:

  • the debugger stack list (ScrolledList) had only background="white"; it now uses the colors of the IDLE theme, like the tree-based viewers (this also makes it fit the IDLE Dark theme);
  • the stack viewer canvas had bg="white" while its labels use the theme colors; it now uses the theme background, as the module browser does;
  • the "Squeezed text" button had only a background;
  • the yellow error label in the debugger had only a background.

Supersedes #121772 (thanks to @tadeja for the analysis of the debugger case).

🤖 Generated with Claude Code

Widgets with only one hard-coded color got the other one from the
system, which made text unreadable in dark mode.  The debugger stack
list and the stack viewer now use the colors of the IDLE theme, and
the squeezed text button and the debugger error label set both colors.
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Sep 17, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant