<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="https://git.reviewboard.kde.org/r/115596/">https://git.reviewboard.kde.org/r/115596/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On February 15th, 2014, 12:24 p.m. UTC, <b>Albert Astals Cid</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;">I still feel it's a pixel too low, at lest the "Opened a document of 5 pages" message seems closer to the bottom line now than without the patch. If you'ree feeling i'm being too silly i can try to fix this thing myself :D</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;">The way the bounding box is computed is a bit different so maybe a perfect match is not easy; you can try with changing line 377 in pageviewutils.cpp:
textYOffset = (geometry().height() - textRect.height() - detailsRect.height() - m_lineSpacing) / 2 + 1,
but I felt it was one pixel too high - what do you think?</pre>
<br />
<p>- Luigi</p>
<br />
<p>On February 12th, 2014, 11:04 p.m. UTC, Luigi Toscano wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Okular.</div>
<div>By Luigi Toscano.</div>
<p style="color: grey;"><i>Updated Feb. 12, 2014, 11:04 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</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;">So far the messages displayed by PageViewMessage are quite short (grep for "emit {error|warning|info}" in the code). The widget does not resize with long messages, nor does it resize on viewparent resize. The patch fixes this (with a bit of heuristic in the calculation of the boundary).
Side note: I originally thought about porting it to KMessageWidget, but it was more complex (with a different behavior in the end) that fixing it. On the other side, PageViewTopMessage is a better candidate for being ported (it's already used in layouts), but that's another story.</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;">Tested normally and --reverse. I will attach a patch that allows to quickly test it.</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>ui/pageviewutils.h <span style="color: grey">(bc77cc9)</span></li>
<li>ui/pageviewutils.cpp <span style="color: grey">(3f99248)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115596/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>
<ul>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2014/02/09/1f06fce0-68d5-4cb1-bd45-a1727e7e3789__test_longmessage.diff">Patch to test the change</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>