<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/125773/">https://git.reviewboard.kde.org/r/125773/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On November 2nd, 2015, 12:05 p.m. UTC, <b>Sebastian Kügler</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I don't like this change, as it introduces a magic constant for a value that we completely control our own. (Well, to the degree that we say "a gridUnit is roughly the height of a line of text". The 1.6 constant looks weird here, and I'm against adding font specific hacks in, especially since at that point in the code, we don't even know what the font is.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This is not a structural solution, so -1.</p></pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I understand, but what is a structural solution?
The font metric is clearly wrong for Noto, Oxygen (and certainly some other fonts) and this change is backwards compatible with current code.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">And this is not a font specific hack, this just scales the actual height of M to the expected gridUnit value because gridUnit never was a height of M character (it is like 1.6 * height of M = thus the magic number).</p></pre>
<br />
<p>- David</p>
<br />
<p>On October 29th, 2015, 6:16 p.m. UTC, David Rosca wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for Plasma.</div>
<div>By David Rosca.</div>
<p style="color: grey;"><i>Updated Oct. 29, 2015, 6:16 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=343349">343349</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-framework
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For some fonts, QFontMetrics::boundingRect(QString) returns too high rect which makes the gridSize too big.
It now returns correctly the actual height of M character. For backwards compatibility, the value is multiplied with 1.6.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This affects eg. Noto Sans font that is now default for Plasma 5.5.</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">When switching to Noto Sans font, I noticed that icons in system tray grow to big size so it switched to 1 column in vertical panel. Basically everything in Plasma grow too much (even though the font is visually the same or even smaller than DejaVu Sans that I was using before - same font size 9 was used) - too big spacing in task manager, too big popups (application menu, system tray popups), etc ...</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This fixes the issue. This may also fix BUG 343349</p></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/declarativeimports/core/units.h <span style="color: grey">(fa2256e)</span></li>
<li>src/declarativeimports/core/units.cpp <span style="color: grey">(4e2adae)</span></li>
<li>src/plasma/theme.cpp <span style="color: grey">(c49ad4c)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/125773/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/10/29/d409b391-e35e-451f-bb5b-aa42e7eb2bf3__before.png">systray + popup before</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/10/29/445009bc-a4a8-4998-8e82-996a0a4e33fb__after.png">after</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>