<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/104602/">http://git.reviewboard.kde.org/r/104602/</a>
     </td>
    </tr>
   </table>
   <br />



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looks good!

only master though</pre>
 <br />







<p>- C.</p>


<br />
<p>On April 15th, 2012, 2:52 a.m., Friedrich W. H. Kossebau wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Calligra.</div>
<div>By Friedrich W. H. Kossebau.</div>


<p style="color: grey;"><i>Updated April 15, 2012, 2:52 a.m.</i></p>






<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;">Another thing that always sticked into my eyes with Calligra was that the numbers in the rulers did not have a margin around or are even painted over the rectangle of the horizontal ruler for me. Attached patch fixes that for me, cmp. also the screenshots.

It adds a 1 pixel margin around the numbers to both the outside border and the mark's line.
Also makes the rectangle of the horizontal ruler use the full height. Having this smaller just for the tabs & line starts/ends can be questioned, as in Krita and other non-mainly text-oriented UIs there is no need for that, so just a useless mismatch between horizontal and vertical ruler. And the smaller rectangle did not really seem to improve usability with text layout control for me.

Also improves the centering of the number in the horizontal ruler (using /2.0 instead of /2).
(vertical ruler has an offset due to an error in Qt? the coords are okay, as proved by drawing test lines, just the text has a +1 pixel offset)

Code adds the assumption that digits for the number only use glyphs which do not go below the baseline. Does this hold?
    
Ideally the color of the markers are not also in the text color, but some widget color. I tried the Inactive text color for now. Any better idea, which works with both the normal background and the active rectangle? (too bad there is no QWidget standard element for rulers)

FYI, in general, after this fix I would like to try another look, partially inspired by other rulers out there ;) Also that for updates (like on mouse move) the whole ruler is repainted makes me cry :)

There also seems to be an error with the "new tab element" being shown inside the ruler in Krita and others? To be corrected in another patch first.</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;">Changed the zoom and also edited tabulators.</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>libs/main/KoRuler.cpp <span style="color: grey">(b511000)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/104602/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>

<div>

 <a href="http://git.reviewboard.kde.org/r/104602/s/529/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/04/15/RulerMeasurementMargin-Before_400x100.png" style="border: 1px black solid;" alt="Before" /></a>

 <a href="http://git.reviewboard.kde.org/r/104602/s/530/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/04/15/RulerMeasurementMargin-After_400x100.png" style="border: 1px black solid;" alt="After" /></a>

</div>


  </td>
 </tr>
</table>








  </div>
 </body>
</html>