[Okular-devel] Review Request 119894: Only update zoomFactor for current page
Albert Astals Cid
aacid at kde.org
Sun Aug 24 20:37:50 UTC 2014
> On ago. 24, 2014, 2:11 p.m., Fabio D'Urso wrote:
> > 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
> >
> > 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.
> >
> > 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:
> > @@ -3660,6 +3660,10 @@ void PageView::updateZoom( ZoomMode newZoomMode )
> > zoomValue[13] = zoomFactorFitWidth;
> > zoomValue[14] = zoomFactorFitPage;
> > qSort(zoomValue.begin(), zoomValue.end());
> > +
> > + if ( d->items.count() > 0 )
> > + newFactor = d->items[ qMax( 0, (int)d->document->currentPage() ) ]->zoomFactor();
> > +
> > QVector<float>::iterator i;
> > if ( newZoomMode == ZoomOut )
> > {
Reviewed new code to fix this with Fabio on IRC.
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119894/#review65121
-----------------------------------------------------------
On ago. 21, 2014, 10:08 p.m., Albert Astals Cid wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119894/
> -----------------------------------------------------------
>
> (Updated ago. 21, 2014, 10:08 p.m.)
>
>
> Review request for Okular, Markus Trippelsdorf and Tingnan Zhang.
>
>
> Bugs: 335819
> http://bugs.kde.org/show_bug.cgi?id=335819
>
>
> Repository: okular
>
>
> Description
> -------
>
> In the wild world where each page is of different size, only use the current page to update the zoom factor in updateItemSize
>
>
> Diffs
> -----
>
> ui/pageview.cpp 8ceafae
>
> Diff: https://git.reviewboard.kde.org/r/119894/diff/
>
>
> Testing
> -------
>
> Works for me with https://bugs.kde.org/attachment.cgi?id=88318
>
>
> Thanks,
>
> Albert Astals Cid
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140824/60929cf9/attachment.html>
More information about the Okular-devel
mailing list