<table><tr><td style="">cullmann added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24321">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D24321#540437" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D24321#540437</a>, <a href="https://phabricator.kde.org/p/romangg/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@romangg</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D24321#540433" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D24321#540433</a>, <a href="https://phabricator.kde.org/p/cullmann/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@cullmann</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>;=) I talked only about the Qt HiDPI scaling code paths.</p></div>
</blockquote>

<p>In this case I recommend studying the bug report I linked. There is also a patch attempt in Qt but it got closed for some reason.</p></div>
</blockquote>

<p>You can't patch that issues in Qt if e.g. your application relies on facts like you paint 10 lines and you don't get some rounding errors all the time ;)</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;">

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>For any other scaling I don't care, as that should be application transparent, like you say.<br />
 But if Wayland really just scales up the stuff via GL fonts will look terrible.</p></blockquote>

<p>They are scaled down via Gl to match the fractional part of the scaling value. Applications provide pre-scaled buffers of integer factors 2, 3, 4 and so on.</p></blockquote>

<p>Hmm, but that means you still set QT_SCALE_.... to some non-fractional thing like 2, 3, 4 and the only fine adjust, that makes sense.<br />
Thought for me it did look like the small scale window was up-scaled in my try with the 2x combobox field.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;">

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>And no, its non-trivial to fix there any artifacts for strange scales and it makes there computation wise a very large different if the scale factor is 1.2 or 1.25, as the later is something you can sanely compute things with ;)<br />
 Therefore I really would like to have only some larger scaling steps set for the QT_SCALE_FACTOR... stuff and for the smaller things just some font adjustments.</p></blockquote>

<p>Don't see a reason for that. Never heard about necessity in Gl to only calculate with certain floating values for best image quality. But if you can provide some source for that I would be interested in studying that. Can't say I see problems here in a Wayland session though, currently using a scaling factor of 1.8.</p></blockquote>

<p>The issue is that you transform individual elements.</p>

<p>e.g. if you have some list of X graphical elements with height "virtual" pixel 10. If you scale them by 1.1, you get not "real pixel" 11, you get some 11.00100101010 something. If you later compute things like "10 * element size", you not get 110 pixel but again some weired stuff ;=)</p>

<p><a href="https://www.exploringbinary.com/why-0-point-1-does-not-exist-in-floating-point/" class="remarkup-link" target="_blank" rel="noreferrer">https://www.exploringbinary.com/why-0-point-1-does-not-exist-in-floating-point/</a></p>

<p>If you apply that as transform on the full texture, I can agree that it shouldn't be a real issue.<br />
But if it is applied as QT_SCALE... you will have the issue of rounding artifacts for the individual widgets/layout members that then sum up in weired ways. <br />
You get already some artifacts with 1/2 or 1/4, but at least you can multiply that sanely (as long as your floating point numbers don't get enourmous).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R104 KScreen</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24321">https://phabricator.kde.org/D24321</a></div></div><br /><div><strong>To: </strong>ngraham, VDG, Plasma, romangg<br /><strong>Cc: </strong>davidedmundson, ouwerkerk, GB_2, ndavis, cullmann, plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>