johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.37k stars 292 forks source link

Two finger zoom on a touch screen behaves erratically in GTK4 branch #1040

Closed archisman-panigrahi closed 1 year ago

archisman-panigrahi commented 1 year ago

Describe the bug When I try to zoom with two fingers in my touch screen laptop, it usually does not work, and sometimes, it zooms in a little bit, and gets stuck.

Two finger zoom used to work flawlessly in version 2.6.4

To Reproduce Steps to reproduce the behavior:

  1. Open Foliate GTK4 branch on a touch screen computer with multi-touch support.
  2. Try to use two-finger zoom while reading an ebook.

There are no error logs in the terminal when I try to zoom in with two fingers.

Expected behavior One should be able to zoom in/out with two fingers.

Screenshots If applicable, add screenshots to help explain your problem.

Version:

johnfactotum commented 1 year ago

Yes, touchscreen pinch zoom was intentionally disabled when swiping was added as it interfered with it, and the fact that it still works sometimes is actually a bit concerning. Technically this is a foliate-js bug, which is where the touch events are currently handled. I will try to add it back, though I'm more interested in knowing whether swiping works or not, since I'm not able to test it in Foliate.

archisman-panigrahi commented 1 year ago

I'm more interested in knowing whether swiping works or not

Yes, swiping (as well as its animation) works perfectly on the gtk4 branch.


In version 2.6.4, both swiping and two-finger-zoom worked (although there were no swipe animations in 2.6.4). It would be great if both these features are simultaneously available on the next version of Foliate.

archisman-panigrahi commented 1 year ago

I will be happy to test any touch-related features, and post screenshots/screen recordings for them.

archisman-panigrahi commented 1 year ago

Both pinch to zoom and swipe are working perfectly.

Please feel free to ping me if you want me to test any touch-related feature.