! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Enable panning across a zoomed-in image
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Ristretto
Component:
Application

Comments

Description Andrew Ash 2012-08-03 10:26:12 CEST
Created attachment 4576 
shift-panning patch

Ristretto is great, though a falls a little short in one use case.  I want to zoom into a large image and look around in that image.  While zoomed-in, scrolling moves between images in the list, and I would expect it to pan across the image instead.

As a workaround, I'm attaching a patch that enables panning when the shift key is held, just like zooming with the control key.

I would appreciate it if this patch was committed into master for future releases.  I created it with

git format-patch HEAD^

It can be applied with

git am 0001-Support-shift-scroll-to-pan-across-an-image.patch

Thanks!
Andrew
Comment 1 Stephan Arts editbugs 2012-08-11 23:16:11 CEST
I really like the patch, but I have a few comments about how I like to see it:

1) Could you please use /* these */ comments instead of //
2) Please modify the function to use a 'ret' variable, set it's value and return that. Do not remove the 'break' statements.

If you change that, I would be happy to apply the patch :)
Comment 2 Andrew Ash 2012-08-21 09:15:56 CEST
Created attachment 4602 
shift-panning patch v2

Thanks for the constructive feedback!  I've made those changes and I think the updated patch is now ready for committing.

I made this as a quick-fix, but I think there's a better UI/UX way to support panning on zoomed-in images.  The downside of the current patch is that I expect scrolling when zoomed in to pan, when it actually moves between images.  The longer-term fix would have panning when zoomed-in, but image selection when zoomed out.  It would work like this:

1) open directory with several images
2) vertical/horizontal scrolling moves between images
3) zoom into an image
4) vertical/horizontal scrolling pans across that image
5) zoom out until the scroll pane has no scroll bars
6) vertical/horizontal scrolling moves between images again

Would you support a patch that created that behavior?
Comment 3 Andrew Ash 2012-11-01 08:19:57 CET
Hi Stephan,

I made an updated patch to your specifications, are there any other changes you'd like to see before committing it?
Comment 4 Stephan Arts editbugs 2013-02-02 13:24:00 CET
I've committed your patch in master.

I've slightly modified it to remove any duplicate-code.

Thank you :-)

Bug #9174

Reported by:
Andrew Ash
Reported on: 2012-08-03
Last modified on: 2013-02-02

People

Assignee:
Stephan Arts
CC List:
0 users

Version

Version:
master

Attachments

shift-panning patch (1.42 KB, patch)
2012-08-03 10:26 CEST , Andrew Ash
no flags
shift-panning patch v2 (1.58 KB, patch)
2012-08-21 09:15 CEST , Andrew Ash
no flags

Additional information