[Digikam-devel] [Bug 178540] zoom in previewwidget has poor behaviour
brandon at sharpideas.ca
Wed Dec 24 01:00:34 GMT 2008
--- Comment #2 from brandon <brandon sharpideas ca> 2008-12-24 02:00:27 ---
Created an attachment (id=29594)
Patch to improve scroll zooming.
Here is the code I am playing around with so far. It will be less verbose after
I test it a little more.
Basically to re-state the problem:
You should be able to put the mouse over a point on an image and use the scroll
wheel to zoom all the way to max zoom right to that point without having to
move the mouse.
As previewwidget.cpp works now you have to keep re-centering the mouse on the
point you are trying to zoom in on.
This is because there are limitations to Q3ScrollView. It can't for example
scroll negatively or, scroll so far that the right edge of an image is in the
center of the viewport.
To overcome this you need to either 'bump' the mouse cursor, to keep it
centered on the zoomCenterPoint, or adjust the pixmap x/y co-ordinates.
Right now I am only, 'bumping' the cursor, so you can smoothly zoom right in to
any point on the image even the edges without having to reposition the mouse.
In the future it might be worth adjusting the pixmap location as well,
especially for the right and bottom edges. However the problem with adjusting
the pixmap location is, it is once it has been adjusted it's impossible to know
when the user would want the image be re-centered.
Anyway hope somebody likes using scroll-zoom and finds this useful.
I'm new to Qt/Kde so don't be shy about pointing out things I could have done
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Digikam-devel