[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:       "Martin Klapetek" <martin.klapetek () gmail ! com>
Date:       2015-06-09 6:11:09
Message-ID: 20150609061109.2486.92475 () mimi ! kde ! org
[Download RAW message or body]

--===============3093396728213898213==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On June 8, 2015, 11:20 p.m., Kai Uwe Broulik wrote:
> > applets/digital-clock/package/contents/ui/DigitalClock.qml, line 452
> > <https://git.reviewboard.kde.org/r/124047/diff/1/?file=379315#file379315line452>
> > 
> > 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));
> 
> Marco Martin wrote:
> what about instead of HTML implementing a different layout delefate instead? so \
> that wouldbecome one single repeater and would perhaps be less tricky for \
> translations

Marco: I can try overriding the default tooltip if that's preferred


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124047/#review81320
-----------------------------------------------------------


On June 8, 2015, 11:10 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124047/
> -----------------------------------------------------------
> 
> (Updated June 8, 2015, 11:10 p.m.)
> 
> 
> 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
> 
> 


--===============3093396728213898213==
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 />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 8th, 2015, 11:20 p.m. CEST, <b>Kai Uwe \
Broulik</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/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">&quot;&lt;tr&gt;&lt;td \
align=\&quot;right\&quot;&gt;&lt;b&gt;%1&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;%2&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&quot;</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>

  <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 += "&lt;tr&gt;&lt;%1 \
align='right'&gt;%2&lt;/%1&gt;&lt;%1&gt;%3&lt;/%1&gt;&lt;/tr&gt;".arg(isCurrent ? \
"th" : "td").arg(timezoneString).arg(Qt.formatTime(dateTime, \
main.timeFormat));</p></pre>  </blockquote>



 <p>On June 9th, 2015, 7:32 a.m. CEST, <b>Marco Martin</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;">what \
about instead of HTML implementing a different layout delefate instead? so that \
wouldbecome one single repeater and would perhaps be less tricky for \
translations</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;">Marco: I can try overriding the default tooltip if that's \
preferred</p></pre> <br />




<p>- Martin</p>


<br />
<p>On June 8th, 2015, 11:10 p.m. CEST, 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 June 8, 2015, 11:10 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="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>


--===============3093396728213898213==--


[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