<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/119894/">https://git.reviewboard.kde.org/r/119894/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On agost 24th, 2014, 2:11 p.m. UTC, <b>Fabio D'Urso</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;">So we had a loop that set d->zoomFactor repeatedly, I didn't know that, I guess the last iteration was the one that won :P</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've tried your patch on the document from the bug and I'm noticing this issue: if you choose, say, "fit width" on the first page, go to the second page and zoom out, you actually zoom in. Is it intended behavior? I would expect zoom out to always reduce the page size on the screen.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What about moving the "use the current page as reference" thing when the user actually changes zoom, so that zoom in/out always take the real current page as reference? Something like this:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
@@ -3660,6 +3660,10 @@ void PageView::updateZoom( ZoomMode newZoomMode )<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
zoomValue[13] = zoomFactorFitWidth;<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
zoomValue[14] = zoomFactorFitPage;<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
qSort(zoomValue.begin(), zoomValue.end());<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
+<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
+ if ( d->items.count() > 0 )<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
+ newFactor = d->items[ qMax( 0, (int)d->document->currentPage() ) ]->zoomFactor();<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
+<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
QVector<float>::iterator i;<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
if ( newZoomMode == ZoomOut )<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
{</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Reviewed new code to fix this with Fabio on IRC.</p></pre>
<br />
<p>- Albert</p>
<br />
<p>On agost 21st, 2014, 10:08 p.m. UTC, Albert Astals Cid 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 Okular, Markus Trippelsdorf and Tingnan Zhang.</div>
<div>By Albert Astals Cid.</div>
<p style="color: grey;"><i>Updated ago. 21, 2014, 10:08 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="http://bugs.kde.org/show_bug.cgi?id=335819">335819</a>
</div>
<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In the wild world where each page is of different size, only use the current page to update the zoom factor in updateItemSize</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;">Works for me with https://bugs.kde.org/attachment.cgi?id=88318</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>ui/pageview.cpp <span style="color: grey">(8ceafae)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/119894/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>