[PATCH 3/3] Profile: attempt on better zoom and pan logic

Lubomir I. Ivanov neolit123 at gmail.com
Fri Jul 5 02:29:52 PDT 2013


On 5 July 2013 12:14, Henrik Brautaset Aronsen
<subsurface at henrik.synth.no> wrote:
> Bah.  I meant the zoom slider.  Obviously. :)
>
> henrik
>
>

there is an enum here:
http://harmattan-dev.nokia.com/docs/library/html/qt4/qt.html#ScrollBarPolicy-enum

but the strange thing is that if the default is used:
Qt::ScrollBarAsNeeded (presumably only show if scroll bars are needed)

the zoom-in suddenly stops working and mapFromScene() starts receiving
wrong values (tooltip is off), which is weird/undocumented behavior,
i'd think.

always showing the scroll bars works fine using Qt::ScrollBarAlwaysOn
and we can use that if you want, but it reveals that my calculations
in scrollViewTo() are off a bit. then again, the regular formula for a
proportion with a negative minimum does not work here...:
x = ratio * totalWidth + negativeMinium

QScrollBar / QGraphicsView resembles some of the GTK nonsense, we've
encountered previously..

lubomir
--


More information about the subsurface mailing list