Re: [Tkinter-discuss] 4k HiDPI displays and tkinter [cont]

2022-03-23 Thread Vasilis Vlachoudis
I forgot to reply to you, >>> f=font.Font(name='TkDefaultFont', exists=1) >>> rowheight=f.metrics('linespace')+2 >>> rowheight works beautifully. Many thanks!! ___ Tkinter-discuss mailing list Tkinter-discuss@python.org

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter [cont]

2022-03-17 Thread Michael Lange
Hi, On Thu, 17 Mar 2022 09:47:16 + Vasilis Vlachoudis wrote: > Hi Michael, > > no I am using the default fonts. > What is different is the I have set a high DPI for the X-server to > match the screen resolution. > > I saw in the page > https://www.tcl.tk/man/tcl/TkCmd/ttk_treeview.html > >

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter [cont]

2022-03-17 Thread Vasilis Vlachoudis
not dynamic with the font size/dpi Vasilis From: Tkinter-discuss [tkinter-discuss-bounces+vasilis.vlachoudis=cern...@python.org] on behalf of Michael Lange [klappn...@web.de] Sent: Thursday, March 17, 2022 10:35 To: tkinter-discuss@python.org Subject: Re: [

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter [cont]

2022-03-17 Thread Michael Lange
Hi, On Wed, 16 Mar 2022 16:16:36 + Vasilis Vlachoudis wrote: > On the same topic of HiDPI screens, the Treeview seems to calculate > wrongly the font height (see attach image) > Do you know any way to correct that? > are you possibly using a point-sized font? If yes, maybe there is some

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-14 Thread Paul
y, July 14, 2021 15:48 To: Aivar Annamaa; tkinter-discuss@python.org Subject: Re: [Tkinter-discuss] 4k HiDPI displays and tkinter Thank you all for the sug

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-14 Thread Michael Lange
Hi, On Wed, 14 Jul 2021 14:22:37 + Vasilis Vlachoudis wrote: > 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") > >

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-14 Thread Vasilis Vlachoudis
on.org] on behalf of Vasilis Vlachoudis [vasilis.vlachou...@cern.ch] Sent: Wednesday, July 14, 2021 15:48 To: Aivar Annamaa; tkinter-discuss@python.org 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 g

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-14 Thread Vasilis Vlachoudis
] 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

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-13 Thread Aivar Annamaa
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,

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-13 Thread Michael Lange
Hi, On Mon, 12 Jul 2021 20:31:57 +0100 E Paine wrote: > > - 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 >

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-13 Thread E Paine
> - 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",

Re: [Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-12 Thread Michael Lange
Hi, On Mon, 12 Jul 2021 17:13:18 + Vasilis Vlachoudis 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. > -

[Tkinter-discuss] 4k HiDPI displays and tkinter

2021-07-12 Thread Vasilis Vlachoudis
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