Re: 4k HiDPI displays and tkinter
Paul <[email protected]> Wed, 14 Jul 2021 17:54:29 +0200
| Newsgroups | gmane.comp.python.tkinter |
|---|---|
| Message-ID | <[email protected]> |
--===============2730991685223096129==
Content-Type: text/html; charset=windows-1252
Content-Language: en-GB
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<pre class="moz-quote-pre" wrap="">style.configure("TScrollbar", arrowsize=10)</pre>
<div class="moz-signature">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<title>signature</title>
<meta name="generator" content="LibreOffice 5.1.6.2 (Linux)">
<meta name="created" content="00:00:00">
<meta name="changed" content="2017-08-11T10:20:11.109043062">
<p style="margin-bottom: 0cm"><b>Regards</b><br>
<br>
<font style="font-size: 14pt" size="4"><b>Paul
Malherbe</b></font><br>
<br>
</p>
<table cellspacing="2" cellpadding="2">
<tbody>
<tr>
<td style="border: none; padding: 0cm">
<p><font style="font-size: 7pt" size="1">Phone</font></p>
</td>
<td style="border: none; padding: 0cm">
<p><font style="font-size: 7pt" size="1">+27(0)28 314 0092</font></p>
</td>
</tr>
<tr>
<td style="border: none; padding: 0cm">
<p><font style="font-size: 7pt" size="1">Mobile</font></p>
</td>
<td style="border: none; padding: 0cm">
<p><font style="font-size: 7pt" size="1">+27(0)82 900 5260</font></p>
</td>
</tr>
</tbody>
</table>
<p><br>
<br>
</p>
</div>
<div class="moz-cite-prefix">On 2021/07/14 16:22, Vasilis Vlachoudis
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" id="owaParaStyle"></style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">I am trying to change the tk widgets
to ttk, so I can globally correct them, e.g.
<div>
<div>root=tk.Tk()</div>
<div><span style="font-size: 13.3333px;">sb=ttk.Scrollbar(root)</span></div>
<div><span style="font-size: 13.3333px;">sb.pack(side=tk.RIGHT,fill=tk.Y)</span></div>
<div><span style="font-size: 13.3333px;">style=ttk.Style()</span></div>
</div>
<div><span style="font-size: 13.3333px;">style.configure("TScrollbar",
width="10m")</span></div>
<div><br>
</div>
<div>However the width doesn't apply on the up/downarrows which
they remain tiny.</div>
<div>Where I can find the style options that I can change?<br>
<div>
<div>I've tried </div>
<div><span style="font-size: 13.3333px;">style.configure("TScrollbar.uparrow",
width="10m")</span></div>
<div><span style="font-size: 13.3333px;">but doesn't work</span></div>
<div><br>
</div>
<div>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px; font-family:Tahoma">
<div style="font-size:13px; font-family:Tahoma"><font
size="1"><span style="font-family:Helvetica">Vasilis</span><span
style="font-family:Helvetica"><br>
</span></font></div>
<div style="font-size:13px; font-family:Tahoma"><font
size="1"><span style="font-family:Helvetica"><br>
</span></font></div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000;
font-size: 16px">
<hr tabindex="-1">
<div id="divRpF331097" style="direction: ltr;"><font
size="2" face="Tahoma" color="#000000"><b>From:</b>
Tkinter-discuss
[<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>]
on behalf of Vasilis Vlachoudis
[<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>]<br>
<b>Sent:</b> Wednesday, July 14, 2021 15:48<br>
<b>To:</b> Aivar Annamaa; <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a><br>
<b>Subject:</b> Re: [Tkinter-discuss] 4k HiDPI
displays and tkinter<br>
</font><br>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma;
color:#000000; font-size:10pt">Thank you all for the
suggestions.
<div>I am going to try them.</div>
<div>It would have been nice it tk had a global option
to rescale everything by x2<br>
Like in XFCE window manager</div>
<div>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px;
font-family:Tahoma">
<div style="font-size:13px;
font-family:Tahoma"><font size="1"><span
style="font-family:Helvetica">Vasilis</span><br
style="font-family:Helvetica">
<span style="font-family:Helvetica"><br>
</span></font></div>
</div>
</div>
</div>
</div>
<div style="font-family:Times New Roman;
color:#000000; font-size:16px">
<hr tabindex="-1">
<div id="divRpF448604" style="direction:ltr"><font
size="2" face="Tahoma" color="#000000"><b>From:</b>
Tkinter-discuss
[<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>]
on behalf of Aivar Annamaa
[<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>]<br>
<b>Sent:</b> Tuesday, July 13, 2021 12:41<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a><br>
<b>Subject:</b> Re: [Tkinter-discuss] 4k HiDPI
displays and tkinter<br>
</font><br>
</div>
<div>
<div dir="ltr">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
<i>em</i>-s: <a
href="https://github.com/thonny/thonny/blob/3f2607ff0b27ffedac9b24a107ea9fff5f6b1f1f/thonny/ui_utils.py#L2271"
rel="noopener noreferrer" target="_blank"
moz-do-not-send="true">https://github.com/thonny/thonny/blob/3f2607ff0b27ffedac9b24a107ea9fff5f6b1f1f/thonny/ui_utils.py#L2271</a>
<div><br>
</div>
<div>Best regards,<br>
Aivar</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jul
12, 2021 at 8:13 PM Vasilis Vlachoudis <<a
href="mailto:[email protected]"
rel="noopener noreferrer" target="_blank"
moz-do-not-send="true">[email protected]</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;
border-left:1px solid rgb(204,204,204);
padding-left:1ex">
<div>
<div style="direction:ltr;
font-family:Tahoma; color:rgb(0,0,0);
font-size:10pt">
Recently I've got a 4k laptop, and the
first experience with linux and the 4k
display is quite painful.
<div>I am still trying to tune it but
for the moment my tkinter applications
do not render nicely on such a
display.</div>
<div>- 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?</div>
<div>- checkbox, radiobox the indicator
appears tiny wrt the text</div>
<div><br>
</div>
<div>Is there a way to detect from
tkinter a high res display and force a
window scaling x2 for everything?</div>
<div>What is your experience with such
displays?</div>
<div>
<div><br>
<div style="font-family:Tahoma;
font-size:13px">
<div style="font-family:Tahoma;
font-size:13px">
<div style="font-size:13px;
font-family:Tahoma">
<div style="font-size:13px;
font-family:Tahoma"><font
size="1"><span
style="font-family:Helvetica">Vasilis </span><span
style="font-family:Helvetica"><br>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Tkinter-discuss mailing list<br>
<a href="mailto:[email protected]"
rel="noopener noreferrer" target="_blank"
moz-do-not-send="true">[email protected]</a><br>
<a
href="https://mail.python.org/mailman/listinfo/tkinter-discuss"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://mail.python.org/mailman/listinfo/tkinter-discuss</a><br>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Tkinter-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/tkinter-discuss">https://mail.python.org/mailman/listinfo/tkinter-discuss</a>
</pre>
</blockquote>
</body>
</html>
--===============2730991685223096129==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Tkinter-discuss mailing list
[email protected]
https://mail.python.org/mailman/listinfo/tkinter-discuss
--===============2730991685223096129==--