Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE fix colors for MacOS dark mode #86997

Open
E-Paine mannequin opened this issue Jan 5, 2021 · 4 comments · May be fixed by #121772
Open

IDLE fix colors for MacOS dark mode #86997

E-Paine mannequin opened this issue Jan 5, 2021 · 4 comments · May be fixed by #121772
Assignees
Labels
OS-mac topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@E-Paine
Copy link
Mannequin

E-Paine mannequin commented Jan 5, 2021

BPO 42831
Nosy @terryjreedy, @taleinat, @E-Paine

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/terryjreedy'
closed_at = None
created_at = <Date 2021-01-05.12:54:54.117>
labels = ['easy', 'type-bug', '3.8', '3.9', '3.10', 'expert-IDLE']
title = 'IDLE fix colours for MacOS dark mode'
updated_at = <Date 2021-05-28.20:14:35.351>
user = 'https://github.com/E-Paine'

bugs.python.org fields:

activity = <Date 2021-05-28.20:14:35.351>
actor = 'taleinat'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2021-01-05.12:54:54.117>
creator = 'epaine'
dependencies = []
files = []
hgrepos = []
issue_num = 42831
keywords = ['easy', 'newcomer friendly']
message_count = 3.0
messages = ['384391', '384416', '384420']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'taleinat', 'epaine']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue42831'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Linked PRs

@E-Paine
Copy link
Mannequin Author

E-Paine mannequin commented Jan 5, 2021

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 systemWindowBackgroundColors.

@E-Paine E-Paine mannequin added 3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes labels Jan 5, 2021
@E-Paine E-Paine mannequin assigned terryjreedy Jan 5, 2021
@E-Paine E-Paine mannequin added topic-IDLE 3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes labels Jan 5, 2021
@E-Paine E-Paine mannequin assigned terryjreedy Jan 5, 2021
@E-Paine E-Paine mannequin added the topic-IDLE label Jan 5, 2021
@terryjreedy
Copy link
Member

terryjreedy commented Jan 5, 2021

This might be related to #52197, about IDLE and 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.

@E-Paine
Copy link
Mannequin Author

E-Paine mannequin commented Jan 5, 2021

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)

@taleinat taleinat added easy type-bug An unexpected behavior, bug, or error labels May 28, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@terryjreedy terryjreedy changed the title IDLE fix colours for MacOS dark mode IDLE fix colors for MacOS dark mode Oct 19, 2023
@tadeja
Copy link

tadeja commented Jul 14, 2024

I can confirm this issue can be still seen with M1 MacOS 14.5 Dark mode in IDLE Debugger (Debug Control) on the current main branch (Python 3.14.0a0) where stack trace text is not visible as on the first screenshot.
Screenshot 2024-07-14 at 16 07 42

I would like to propose a change to specify foreground color of the stack trace. The result can be seen on the second screenshot below. Would this be fine? @terryjreedy
Screenshot 2024-07-14 at 16 13 01

"About IDLE" and Help dialogue do not seem to be affected anymore (or I'm not seeing it).

@tadeja tadeja linked a pull request Jul 14, 2024 that will close this issue
@terryjreedy terryjreedy added OS-mac and removed easy 3.10 only security fixes 3.9 only security fixes 3.8 (EOL) end of life labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-mac topic-IDLE type-bug An unexpected behavior, bug, or error
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants