TTK button size with different Windows scalings

32 Views Asked by At

I have written a Python application with the sv_ttk Deisgn. A button looks like this, for example:

execute_button = ttk.Button(root, text="Execute", command=lambda:  execute_command(command_entry.get()), style='Modern.TButton')
execute_button.pack(pady=10)
execute_button.bind("<Enter>", lambda _: execute_button.config(cursor="hand2"))
execute_button.bind("<Leave>", lambda _: execute_button.config(cursor=""))
execute_button.config(width=15, style='Modern.TButton')

But when I open it on another Windows device with a different default screen zoom, the buttons are much too small.

How can I solve this? Many thanks for your help in advance, schBenedikt

I've already done several deep internet searches, also tried to implement a manual zoom in the code

0

There are 0 best solutions below