karlch / vimiv-qt

An image viewer with vim-like keybindings
https://karlch.github.io/vimiv-qt/
GNU General Public License v3.0
177 stars 15 forks source link

Specify scroll distance #844

Open qadzek opened 1 month ago

qadzek commented 1 month ago

Just a detail, but I'm wondering if there is a way to specify the scroll distance in image mode.

Things I tried:

karlch commented 1 month ago

Hey, and sorry for the delay. I was offline for much of last week.

Two of the things you tried are possible, just slightly different:

Note that the current scroll step is 5 %, so less than this is not possible unless we add a configuration for the "default scroll step". Honestly, not the worst idea.

qadzek commented 1 month ago

Thanks for the suggestions.

I was looking for a stronger j key, to quickly scroll images with a very large height.

J : 5scroll down is doing exactly what I want, so feel free to close this issue.

However, a configurable scroll step could be useful.

I noticed that the current step of 5% seems to only be applicable if the zoom level is at 100%. For example, for a 375x3500 px image (a screenshot of a mobile website) zoomed to 400% I had to hit j roughly 50 times to reach the bottom of the picture.

karlch commented 1 month ago

Keeping it open for now as I feel the discussion and ideas are very useful :blush:

So a configurable scroll step it is. Should be really trivial to add.

This is true, it takes 5 % of the original image size as scroll step. I quite like the "adaptability" in the sense that one can scroll more accurately when zooming in. On the other hand, maybe one should use the size of the actual window as reference instead, so it doesn't vary wildly for images of different size :thinking: