Review Request: Limit zooming to a minimum and maximum zoom value
Marijn Kruisselbrink
m.kruisselbrink at student.tue.nl
Wed Feb 9 09:33:38 GMT 2011
> On Feb. 9, 2011, 9:25 a.m., Marijn Kruisselbrink wrote:
> > libs/widgets/KoZoomAction.cpp, lines 78-85
> > <http://git.reviewboard.kde.org/r/100613/diff/1/?file=8794#file8794line78>
> >
> > I'm not entirely sure, but doesn't this change the zoom levels from being exponential (1.25, 2.5, 5, 10, 20, 40, 80 or something like that, but with smaller) to something that has a linear increase in zoom level, and thus quite a different behavior?
So you probably want something like
zoomStep = pow(1/minZoom, 1/16)
for i = 1 to 16
sliderLookup[i] = pow(zoomStep, i-16)
zoomStep = pow(maxZoom, 1/16)
for i = 16 to 32
sliderLookup[i] = pow(zoomStep, i-16)
- Marijn
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100613/#review1319
-----------------------------------------------------------
On Feb. 9, 2011, 12:45 a.m., Arjen Hiemstra wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100613/
> -----------------------------------------------------------
>
> (Updated Feb. 9, 2011, 12:45 a.m.)
>
>
> Review request for Calligra.
>
>
> Summary
> -------
>
> This bug fixes an issue with Calligra's zoom handling, caused by not limiting the minimum and maximum zoom levels. Currently it is possible to completely freeze Tables (or cause even more serious issues) by zoom out far enough.
> Zooming in on the other hand can cause you to get completely lost in your document.
>
> Note that for Krita and others, the default minimum and maximum zoom might not be the best choice, which is why I included a setter for the minimum and maximum values.
>
>
> Diffs
> -----
>
> libs/widgets/KoZoomAction.cpp 4ef4d8b
> libs/widgets/KoZoomController.cpp 54b9168
> libs/widgets/KoZoomHandler.cpp ce234e6
> libs/widgets/KoZoomMode.h 9bfd195
> libs/widgets/KoZoomMode.cpp 293f1af
>
> Diff: http://git.reviewboard.kde.org/r/100613/diff
>
>
> Testing
> -------
>
> Tested on Words, Stage, Tables and Krita. This patch currently breaks the zoom handler unit test, which I will fix after this.
>
>
> Thanks,
>
> Arjen
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110209/d69d401c/attachment.htm>
More information about the calligra-devel
mailing list