Thank you all for the suggestions.
I am going to try them.
It would have been nice it tk had a global option to rescale everything by x2
Like in XFCE window manager

Vasilis

________________________________
From: Tkinter-discuss 
[tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of 
Aivar Annamaa [aivar.anna...@gmail.com]
Sent: Tuesday, July 13, 2021 12:41
To: tkinter-discuss@python.org
Subject: Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

If you want to relate your screen distances to the size of characters in a 
font, then you could use font's `measure` method to compute pixel distances for 
em-s: 
https://github.com/thonny/thonny/blob/3f2607ff0b27ffedac9b24a107ea9fff5f6b1f1f/thonny/ui_utils.py#L2271

Best regards,
Aivar

On Mon, Jul 12, 2021 at 8:13 PM Vasilis Vlachoudis 
<vasilis.vlachou...@cern.ch<mailto:vasilis.vlachou...@cern.ch>> wrote:
Recently I've got a 4k laptop, and the first experience with linux and the 4k 
display is quite painful.
I am still trying to tune it but for the moment my tkinter applications do not 
render nicely on such a display.
- 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?
- checkbox, radiobox the indicator appears tiny wrt the text

Is there a way to detect from tkinter a high res display and force a window 
scaling x2 for everything?
What is your experience with such displays?

Vasilis
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org<mailto:Tkinter-discuss@python.org>
https://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to