-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
Add IDLE Hovertip foreground color needed for recent macOS #120083
Comments
cc @terryjreedy |
IDLE widgets are only intended for use in IDLE; any other use is as-is and at your own risk of IDLE's code changing. (Hence, copying and adjusting the code as needed is safest.) The code as is works on macOS Catalina. IDLE only uses hovertip widget for a fixed color black on white label, from which the black foreground in normally inherited. (I am not sure if the background arg is really needed.) Does this fail in IDLE on Sonoma? To test, start IDLE and in Shell, enter
Unless you turn off sqeezing in Options, you will see a lable with In any case, there is no tkinter bug though there may be mac version-dependent behavior. I suspect the example above could have been fixed by removing the background argument. (I am not sure why it is there.) I would expect a white on brown popup when hovering over a white on brown label. |
@terryjreedy Thanks for looking into this a bit - I'll try running that test in the IDLE console later to see what I get. As far as the For a quick test, I just tried removing As far as using this in tkinter goes, it's the closest thing I'm aware of to native tooltips. That said, given that
I may just look into working up a basic tooltip module myself. FWIW, I submitted this report because I had originally looked into this related issue #78456 and I noticed that the proposed solution had been integrated into |
I also encountered this issue when I tried to create a GUI application with tkinter on Mac. @jriggle 's suggestion is to add the optional function |
@AtsushiSakai Yeah, adding an optional arg to |
Add |
@terryjreedy Do you mean the call to |
…#120605) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (#120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- Co-authored-by: Terry Jan Reedy <[email protected]>
… macOS (pythonGH-120605) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (pythonGH-120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- (cherry picked from commit 5a7f7c4) Co-authored-by: John Riggles <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
… macOS (pythonGH-120605) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (pythonGH-120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- (cherry picked from commit 5a7f7c4) Co-authored-by: John Riggles <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
… macOS (python#120605) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (python#120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- Co-authored-by: Terry Jan Reedy <[email protected]>
…t macOS (GH-120605) (#122592) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (GH-120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- (cherry picked from commit 5a7f7c4) Co-authored-by: John Riggles <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
… macOS (python#120605) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (python#120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- Co-authored-by: Terry Jan Reedy <[email protected]>
…t macOS (GH-120605) (#122739) gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (GH-120605) On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (GH-120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- (cherry picked from commit 5a7f7c4) Co-authored-by: John Riggles <[email protected]> Co-authored-by: Terry Jan Reedy <[email protected]>
Bug report
Bug description:
Minimal Reproducible Example
Proposed Fix
Specifying a foreground color, e.g.
foreground="black"
, at theLabel
declaration inHovertip.showcontents()
fixes the issueCPython versions tested on:
3.12
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: