
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-03-04 03:17 bygreylaw89, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| kdedarktheme.png | cheryl.sabella,2019-03-09 14:13 | |||
| searchdialogdark.png | cheryl.sabella,2019-03-09 14:14 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12262 | merged | terry.reedy,2019-03-10 05:15 | |
| PR 12269 | merged | miss-islington,2019-03-11 00:18 | |
| Messages (8) | |||
|---|---|---|---|
| msg337065 -(view) | Author: Kristoffer Law (greylaw89) | Date: 2019-03-04 03:17 | |
IDLE utilizes the foreground text color from KDE/Qt (Window Text) for the autocomplete and calltip windows. If a dark theme is selected and the window text changed to white or another bright color, it can be difficult or impossible to see due to lack of contrast. There does not appear to be any way to change these particular windows text or background color settings from IDLE's configuration.Modifying the variables under line 192 in autocomplete_w.py (bg="white") and line 83 in calltip_w.py (background="#ffffe0") allows these windows to change background colors.Perhaps add these as settings in IDLE's config? Or force the foreground color to always be black?Python 3.7.2GCC 8.2.1KDE Plasma Version: 5.15.2KDE Frameworks Version: 5.55.0Qt Version: 5.12.1(This is my first bug submission ever, so if I missed something obvious, I apologize in advance) | |||
| msg337541 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-03-08 22:12 | |
The only thing missing is the OS, which I presume is some version and distribution of Linux.IDLE used tkinter which uses tcl/tk. From what you say, the latter, at least on Linux, picks up its default colors from the window manager, which for you happens to be KDE. (This seems not true, at least not yet, on current macOS, as switching to the new dark theme has no effect on IDLE.) This suggests that when a widget has both foreground and background settings, IDLE should leave both alone to use compatible defaults or set both.Except for text windows (which have both fore- and back-grounds) and frames and canvases (which only have background), IDLE generally does not set colors. I just verified this for the settings and search dialogs. Do these switch to light on dark when you set you screen to the same?Setting autocomplete bg to white is an anomaly from before 2005. It is useless or wrong and I think we should just delete the setting.Setting the calltip and tooltips backgrounds (tooltip.py, line 162) to yellow is intentional, to contrast with the text. So we should also set the foregrounds (to black). I don't think these need to be configurable.Cheryl, does your Ubuntu desktop have a dark theme option? If so, does it affect tk defaults and hence IDLE? | |||
| msg337542 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-03-08 22:13 | |
Kristoffer, can you try removing 'bg=while' from autocomplete_w.py? | |||
| msg337571 -(view) | Author: Cheryl Sabella (cheryl.sabella)*![]() | Date: 2019-03-09 14:13 | |
I didn't see an issue with a Gnome, so I installed KDE Plasma and switched to the dark theme. I was able to recreate the issue for autocomplete. When I tried 'open file', I also saw it there and I've attached a screen print showing how it looks on 'open file'.Removing the 'bg=white' in autocomplete_w.py fixes the issue by changing it to a gray background with the almost white text. Of course that doesn't affect the 'open file' window.I've also attached a screen print of what the search dialog looks like. | |||
| msg337596 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-03-10 04:35 | |
I presume that the folders have names I cannot see because they are white on white, even though the current directly name is black (on gray). The effect of the dark screen theme seems inconsistent. The open and save-as dialog boxes are provided by tk to either use or match the OS version. (On Windows, I am fairly sure the native widget is being used.) The tkinter wrappers are in its filedialog module. There are no color options. So this is a tkinter or more likely, tk, issue. This suggests to me that tcl/tk and KDE are not quite compatible.The search box (searchbase.py) uses ttk widgets. It seems that ttk.Frame picks up its background color from the environment while the included ttk widgets do not. The effect is a little strange, but at least the text, including the entered text is readable. We could make the backgrounds consistent either by setting the frame 'white' or by conditionally using a dark theme (there might already be one) for the contained widgets. This is a separate issue. The 3.7.3rc cutoff is in a couple of days so I will make a minimal PR to fix the overt bugs that we know about and can. | |||
| msg337597 -(view) | Author: Kristoffer Law (greylaw89) | Date: 2019-03-10 04:38 | |
Awesome, thanks.Let me know if there is anything you'd like me to test, it looks likeyou've already tested removing that variable.On Sat, Mar 9, 2019, 20:35 Terry J. Reedy <report@bugs.python.org> wrote:>> Terry J. Reedy <tjreedy@udel.edu> added the comment:>> I presume that the folders have names I cannot see because they are white> on white, even though the current directly name is black (on gray). The> effect of the dark screen theme seems inconsistent.>> The open and save-as dialog boxes are provided by tk to either use or> match the OS version. (On Windows, I am fairly sure the native widget is> being used.) The tkinter wrappers are in its filedialog module. There are> no color options. So this is a tkinter or more likely, tk, issue. This> suggests to me that tcl/tk and KDE are not quite compatible.>> The search box (searchbase.py) uses ttk widgets. It seems that ttk.Frame> picks up its background color from the environment while the included ttk> widgets do not. The effect is a little strange, but at least the text,> including the entered text is readable. We could make the backgrounds> consistent either by setting the frame 'white' or by conditionally using a> dark theme (there might already be one) for the contained widgets. This is> a separate issue.>> The 3.7.3rc cutoff is in a couple of days so I will make a minimal PR to> fix the overt bugs that we know about and can.>> ---------->> _______________________________________> Python tracker <report@bugs.python.org>> <https://bugs.python.org/issue36176>> _______________________________________> | |||
| msg337640 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-03-11 00:18 | |
New changeset491ef53c1548c2b593d3c35d1e7bf25ccb443019 by Terry Jan Reedy in branch 'master':bpo-36176: Fix IDLE autocomplete & calltip popup colors. (#12262)https://github.com/python/cpython/commit/491ef53c1548c2b593d3c35d1e7bf25ccb443019 | |||
| msg337641 -(view) | Author: miss-islington (miss-islington) | Date: 2019-03-11 00:37 | |
New changesetea1627008e2ccca3eefa8f4f8123ad74d34c7500 by Miss Islington (bot) in branch '3.7':bpo-36176: Fix IDLE autocomplete & calltip popup colors. (GH-12262)https://github.com/python/cpython/commit/ea1627008e2ccca3eefa8f4f8123ad74d34c7500 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:11 | admin | set | github: 80357 |
| 2020-06-09 13:22:11 | terry.reedy | link | issue7949 superseder |
| 2019-03-11 02:23:20 | terry.reedy | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-03-11 00:37:39 | miss-islington | set | nosy: +miss-islington messages: +msg337641 |
| 2019-03-11 00:18:54 | miss-islington | set | pull_requests: +pull_request12253 |
| 2019-03-11 00:18:42 | terry.reedy | set | messages: +msg337640 |
| 2019-03-10 05:15:26 | terry.reedy | set | keywords: +patch stage: needs patch -> patch review pull_requests: +pull_request12247 |
| 2019-03-10 04:38:13 | greylaw89 | set | messages: +msg337597 |
| 2019-03-10 04:35:32 | terry.reedy | set | messages: +msg337596 |
| 2019-03-09 14:14:29 | cheryl.sabella | set | files: +searchdialogdark.png |
| 2019-03-09 14:13:45 | cheryl.sabella | set | files: +kdedarktheme.png messages: +msg337571 |
| 2019-03-08 22:13:48 | terry.reedy | set | messages: +msg337542 |
| 2019-03-08 22:12:52 | terry.reedy | set | type: enhancement -> behavior stage: needs patch |
| 2019-03-08 22:12:27 | terry.reedy | set | nosy: +cheryl.sabella title: Make IDLE Autocomplete / Calltip Window Colors Configurable -> Fix IDLE Autocomplete / Calltip Window Colors messages: +msg337541 versions: + Python 3.8 |
| 2019-03-04 03:17:11 | greylaw89 | create | |