X Tutup
The Wayback Machine - https://web.archive.org/web/20230210195428/https://github.com/python/cpython/issues/93620
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

Tkinter font removes button rounding #93620

Closed
Moosems opened this issue Jun 8, 2022 · 2 comments
Closed

Tkinter font removes button rounding #93620

Moosems opened this issue Jun 8, 2022 · 2 comments
Labels
expert-tkinter OS-mac type-bug An unexpected behavior, bug, or error

Comments

@Moosems
Copy link

Moosems commented Jun 8, 2022

Bug report

I have been messing around with tkinter in the newest version 3.10.4 and have noticed that when you use a special font on a button that it loses the rounding. How do I use a special font while keeping it round?

Code:

from tkinter import *
window = Tk()
Button(window, text="Example", font=("Courier New bold", 15)).pack()
window.mainloop()

Image:

Screen Shot 2022-05-24 at 4 09 45 PM

Your environment

  • CPython versions tested on: Python 3.10.4
  • Operating system and architecture: MacOSX
@Moosems Moosems added the type-bug An unexpected behavior, bug, or error label Jun 8, 2022
@Moosems
Copy link
Author

Moosems commented Jun 12, 2022

Is there any way to keep the rounding without using ttk?

@serhiy-storchaka
Copy link
Member

Tkinter is a relatively thin wrapper around the Tk library. Use the Tk bug tracker to file a report.

I guess that Tk uses native macOS buttons if it can. But when you specify the font, it falls back to different implementation, because native macOS buttons do not support non-standard font.

@serhiy-storchaka serhiy-storchaka closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expert-tkinter OS-mac type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants
X Tutup