I am trying to change the tk widgets to ttk, so I can globally correct them,
e.g.
root=tk.Tk()
sb=ttk.Scrollbar(root)
sb.pack(side=tk.RIGHT,fill=tk.Y)
style=ttk.Style()
style.configure("TScrollbar", width="10m")
However the width doesn't apply on the up/downarrows which they remain tiny.
Where I can find the style options that I can change?
I've tried
style.configure("TScrollbar.uparrow", width="10m")
but doesn't work
Vasilis
________________________________
From: Tkinter-discuss
[[email protected]] on behalf of
Vasilis Vlachoudis [[email protected]]
Sent: Wednesday, July 14, 2021 15:48
To: Aivar Annamaa; [email protected]
Subject: Re: [Tkinter-discuss] 4k HiDPI displays and tkinter
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
[[email protected]] on behalf of
Aivar Annamaa [[email protected]]
Sent: Tuesday, July 13, 2021 12:41
To: [email protected]
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
<[email protected]<mailto:[email protected]>> 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
[email protected]<mailto:[email protected]>
https://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss