Description: |
Note, the original report was written for Python at http://bugs.python.org/issue28313 . TCL code below.
The following code will result in a small label and a big button:
from tkinter import *
from tkinter.ttk import *
root = Tk()
root.option_add("*Font", "sans-serif 12")
s = Style()
s.configure('TButton', font=('courier', 40))
s.configure('TLabel', font=('courier', 40))
Label(root, text="lbl").pack()
Button(root, text="bttn").pack()
root.mainloop()
It seems to me that both should have the same style. Removing the root.option_add line fixes it of course but this is a stripped-down example and in other cases it might be needed.
option add *Font {sans-serif 12}
ttk::style configure TButton -font {courier 40}
ttk::style configure TLabel -font {courier 40}
ttk::label .label -text lbl
pack configure .label
ttk::button .button -text bttn
pack configure .button
|