Re: 4k HiDPI displays and tkinter
E Paine <[email protected]> Mon, 12 Jul 2021 20:31:57 +0100
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
> - all widths like borderwidths, decorations, separators etc, set in > pixels do not scale with the dpi settings. Could we use "mm" for their > settings instead? Definitely! The defaults in Tk use pixels, but you can use mm for lengths: tk.Label(root, text="foo", borderwidth="5mm", relief="groove") > - checkbox, radiobox the indicator appears tiny wrt the text This may be related to https://bugs.python.org/issue41969, in which case you're just waiting for your repos to update Tk. > Is there a way to detect from tkinter a high res display and force a > window scaling x2 for everything? IDLE has a `fix_scaling` method. Maybe you could use something similar? https://github.com/python/cpython/blob/da2e673c5/Lib/idlelib/run.py#L313 Hope this helped!