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

Macos appearance colors not found in tkinter. #20

Closed
Saadmairaj opened this issue May 11, 2021 · 1 comment · Fixed by #22
Closed

Macos appearance colors not found in tkinter. #20

Saadmairaj opened this issue May 11, 2021 · 1 comment · Fixed by #22
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Saadmairaj
Copy link
Owner

Describe the bug
The appearance colors like "systemWindowBackgroundColor" and "systemTextColor" are giving error _tkinter.TclError: unknown color name for some macOS for some people but on my machine they work perfectly fine.

To Reproduce

import tkinter as tk
from tkmacosx import Button

window = tk.Tk()
button = Button(window, text='Text')#, highlightbackground='gray15', fg='pink')
button.pack()
window.mainloop()

Expected behavior

File "/usr/local/Cellar/[email protected]/3.9.0_2/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 2569, in __init__
    self.tk.call(
_tkinter.TclError: unknown color name "systemWindowBackgroundColor"

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: 11.2.3
  • tkmacosx v1.0.1 (yanked on pypi)
@Saadmairaj Saadmairaj added bug Something isn't working help wanted Extra attention is needed labels May 11, 2021
@Saadmairaj Saadmairaj self-assigned this May 11, 2021
@Saadmairaj Saadmairaj linked a pull request May 14, 2021 that will close this issue
@rgerrits
Copy link

fwiw, I also encountered the this issue without tkmacosx, but when trying to use the MacOS system colors on a regular tk.Button.

BigSur 11.3.1 + Python 3.9.5

If I install Python via the macOS 64-bit Intel installer, then I have this issue.
If I install Python via the macOS 64-bit universal2 installer, then everything works oke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants