<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/127393/">https://git.reviewboard.kde.org/r/127393/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On März 16th, 2016, 6:19 nachm. CET, <b>Martin Klapetek</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/127393/diff/1/?file=453347#file453347line400" style="color: black; font-weight: bold; text-decoration: underline;">applets/digital-clock/package/contents/ui/DigitalClock.qml</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">393</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">height:</span> <span class="nx">dateLabelLeft</span><span class="p">.</span><span class="nx"><span class="hl">font</span></span><span class="p"><span class="hl">.</span></span><span class="nx"><span class="hl">pixelSize</span></span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">400</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">height:</span> <span class="nx">dateLabelLeft</span><span class="p">.</span><span class="nx"><span class="hl">height</span></span><span class="hl"> </span><span class="o"><span class="hl">*</span></span><span class="hl"> </span><span class="mf"><span class="hl">0.7</span></span></pre></td>
</tr>
</tbody>
</table>
<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;">Have you tried dateLabelLeft.paintedHeight?</p></pre>
</blockquote>
<p>On März 16th, 2016, 6:28 nachm. CET, <b>Daniel Faust</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 think that would be the same as dateLabelLeft.height, but the separator is meant to have the same height as the font, not the label.
I would need something like "paintedFontPixelSize".
Alternatively I could calculate the font.pixelSize as a percentage of the label height and use that as a scaling factor.</p></pre>
</blockquote>
<p>On März 16th, 2016, 6:45 nachm. CET, <b>Martin Klapetek</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;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I think that would be the same as dateLabelLeft.height ... I would need something like "paintedFontPixelSize".</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">paintedHeight is the actual height that the painted text has in pixels.</p></pre>
</blockquote>
<p>On März 16th, 2016, 7:11 nachm. CET, <b>Daniel Faust</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 had a second look at your screen shot, I thought that the separator had the exact height as the rendered text, but it really has the height of the label.
After my changes I thought that the separator was too high, so I scaled it down to 70%. But it seems that leaving it at 100% is like it was before.
Since it seems too complicated to calculate the rendered text height, leaving it at 100% height might be the better choice.</p></pre>
</blockquote>
<p>On März 16th, 2016, 7:19 nachm. CET, <b>Martin Klapetek</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;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Since it seems too complicated to calculate the rendered text height</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That's exactly what .paintedHeight property is for. Just try it.</p></pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; 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;">This is the result: http://paste.opensuse.org/view/raw/0b724b7b</p></pre>
<br />
<p>- Daniel</p>
<br />
<p>On März 16th, 2016, 4:53 nachm. CET, Daniel Faust 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 kde-workspace.</div>
<div>By Daniel Faust.</div>
<p style="color: grey;"><i>Updated März 16, 2016, 4:53 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</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;">Currently the digital clock applet uses a fixed font size for the date label when it's placed in a narrow horizontal panel.
Example: http://paste.opensuse.org/view/raw/f8ba5d0d</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">With this patch the same font size is used as for the time label.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">As mentioned at https://git.reviewboard.kde.org/r/127102/ I'm not sure if the current design is a bug or intentional.
On the one hand having a smaller font size reduces the width of the applet, on the other hand having the same font size is more consistent.
I would prefer a consistent look however.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This patch creates one problem though. Currently the height of the date-time-separator is set to the height of the (fixed) date label font size.
With this patch I set the separator height to 70% of the applet height.</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>applets/digital-clock/package/contents/ui/DigitalClock.qml <span style="color: grey">(95bb071)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/127393/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>