[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 124047: Improve clock's tooltip layout
From: "Kai Uwe Broulik" <kde () privat ! broulik ! de>
Date: 2015-06-08 21:20:09
Message-ID: 20150608212009.2486.64946 () mimi ! kde ! org
[Download RAW message or body]
--===============3108382268895945800==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124047/#review81320
-----------------------------------------------------------
Nice improvement!
applets/digital-clock/package/contents/ui/DigitalClock.qml (line 408)
<https://git.reviewboard.kde.org/r/124047/#comment55726>
What does it look like without the <br>? Imho the gap is a bit large. You could \
instead give the table some margin-top
applets/digital-clock/package/contents/ui/DigitalClock.qml (line 443)
<https://git.reviewboard.kde.org/r/124047/#comment55725>
I think you can clean this up a bit to not duplicate all those strings. Also, I \
don't think you should put all of this HTML formatting into the i18n, it lacks \
Qt.application.layoutDirection checks too.
Something like
returnString += "<tr><%1 align='right'>%2</%1><%1>%3</%1></tr>".arg(isCurrent ? \
"th" : "td").arg(timezoneString).arg(Qt.formatTime(dateTime, main.timeFormat));
- Kai Uwe Broulik
On Juni 8, 2015, 9:10 nachm., Martin Klapetek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124047/
> -----------------------------------------------------------
>
> (Updated Juni 8, 2015, 9:10 nachm.)
>
>
> Review request for Plasma.
>
>
> Bugs: 348078
> https://bugs.kde.org/show_bug.cgi?id=348078
>
>
> Repository: plasma-workspace
>
>
> Description
> -------
>
> In kde4 times, the layout of clock's tooltip was nicely arranged using a table. Now \
> it's a bit of a mess so this brings back the table.
> Also simplifies the timeForZone function which is used only for the tooltip.
>
>
> Diffs
> -----
>
> applets/digital-clock/package/contents/ui/DigitalClock.qml a142d33
> applets/digital-clock/package/contents/ui/main.qml e814056
>
> Diff: https://git.reviewboard.kde.org/r/124047/diff/
>
>
> Testing
> -------
>
> See screenshots.
>
>
> File Attachments
> ----------------
>
> Before
> https://git.reviewboard.kde.org/media/uploaded/files/2015/06/08/62594835-6bbb-436d-ba88-f39cb98b3033__clock-tooltip4.png
> After
> https://git.reviewboard.kde.org/media/uploaded/files/2015/06/08/fc93cc02-881b-4bca-96a5-e0356baf4e61__clock-tooltip3.png
>
>
> Thanks,
>
> Martin Klapetek
>
>
--===============3108382268895945800==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<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/124047/">https://git.reviewboard.kde.org/r/124047/</a>
</td>
</tr>
</table>
<br />
<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;">Nice \
improvement!</p></pre> <br />
<div>
<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/124047/diff/1/?file=379315#file379315line408" \
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">408</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="nx">timezoneString</span> <span class="o">+=</span> <span \
class="s2">"<br />"</span><span class="p">;</span></pre></td> <th \
bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">408</font></th> <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="nx">timezoneString</span> <span class="o">+=</span> <span \
class="s2">"<br /><style>td { padding-right: "</span> <span \
class="o">+</span> <span class="nx">units</span><span class="p">.</span><span \
class="nx">smallSpacing</span> <span class="o">+</span> <span class="s2">"px; \
}</style><table>"</span><span class="p">;</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<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;">What \
does it look like without the <br>? Imho the gap is a bit large. You could \
instead give the table some margin-top</p></pre> </div>
</div>
<br />
<div>
<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/124047/diff/1/?file=379315#file379315line452" \
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">448</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">443</font></th> <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> \
<span class="s2">"<tr><td \
align=\"right\"><b>%1</b></td><td><b>%2</b></td></tr>"</span><span \
class="p">,</span> <span class="nx">timezoneString</span><span class="p">,</span> \
<span class="nx">Qt</span><span class="p">.</span><span \
class="nx">formatTime</span><span class="p">(</span><span \
class="nx">dateTime</span><span class="p">,</span> <span class="nx">main</span><span \
class="p">.</span><span class="nx">timeFormat</span><span \
class="p">));</span></pre></td> </tr>
</tbody>
</table>
<div style="margin-left: 2em;">
<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 you can clean this up a bit to not duplicate all those strings. Also, I don't \
think you should put all of this HTML formatting into the i18n, it lacks \
Qt.application.layoutDirection checks too.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Something like \
returnString += "<tr><%1 \
align='right'>%2</%1><%1>%3</%1></tr>".arg(isCurrent ? \
"th" : "td").arg(timezoneString).arg(Qt.formatTime(dateTime, \
main.timeFormat));</p></pre> </div>
</div>
<br />
<p>- Kai Uwe Broulik</p>
<br />
<p>On Juni 8th, 2015, 9:10 nachm. UTC, Martin Klapetek 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 Martin Klapetek.</div>
<p style="color: grey;"><i>Updated Juni 8, 2015, 9:10 nachm.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=348078">348078</a>
</div>
<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;">In kde4 times, the layout of clock's tooltip was \
nicely arranged using a table. Now it's a bit of a mess so this brings back the \
table.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Also simplifies the timeForZone function which is used \
only for the tooltip.</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;">See screenshots.</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">(a142d33)</span></li>
<li>applets/digital-clock/package/contents/ui/main.qml <span style="color: \
grey">(e814056)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/124047/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/06/08/62594835-6bbb-436d-ba88-f39cb98b3033__clock-tooltip4.png">Before</a></li>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/06/08/fc93cc02-881b-4bca-96a5-e0356baf4e61__clock-tooltip3.png">After</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============3108382268895945800==--
[Attachment #3 (text/plain)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic