Page 1 of 1

Better trackpad gesture support (for MacOS and other platforms?)

Posted: Thu Nov 06, 2025 6:25 pm
by atomicthumbs
It would be really nice if I could fully use the trackpad gestures generally supported in other Mac applications to zoom and scroll in XnViewMP. Currently, 2-finger scroll for horizontal and vertical scrolling works, but it's very jerky (on an M1 mac with a low-resolution image) and diagonal panning doesn't work; it's like it's switching poorly between horizontal and vertical scrolling when I try, and scrolling in slowly-updated steps instead of by screen pixels. There is some momentum but with the jerkiness/low update rate it feels quite bad.

Pinch/unpinch to zoom would also be handy.

The ability to rebind horizontal 2-finger scroll to previous/next, with adjustable distance threshold between switches, or even changing that by speed (same distance swiped fast switches through more images), would also be useful. As-is, I can rebind vertical scroll to that, but the speed is too high to be especially useful; some other apps I've seen have a horizontal scroll effect where the previous or next file is visually swiped into the screen in a virtual row of files.

In Qt6, it looks like the QNativeGestureEvent class has support for a swipe event (whose trigger is adjustable in MacOS settings), as well as zoom (2-finger pinch/unpinch), smart zoom (2-finger double tap, usually used to switch between "fit to screen" and "100%"), and panning, which can only be triggered with a 3-finger gesture. 2-finger panning is converted to QWheelEvents, with pixel delta for horizontal and vertical available; these include MacOS's scroll momentum/inertia for a native feel.