[needs testing] Rewritten touch and touchpad support in Krita

It seems like that is a behavior of MacOS. I checked the source code of Qt, and Qt does nothing but forwards the OS-level events to the application. I guess we should return to this question after we merge the temporary straight ruler patch. It allows switching of the shortcuts on the fly…

Anyway, all other issues, like “add pan to zoom and rotate” and “keep transform around midpoint only” are fixed and pushed into the branch. I wonder if I should build newer packages with that…

About entering pan mode and getting stuck with only pinch gesture, I don’t really have any ideas and it’s a fairly minor regression, so I’m fine with this being merged despite that.

I’ve now tested the Qt5 macOS build and confirmed everything trackpad-related works the same as on Qt6 (including that issue).

I also tested the Qt6.11 Linux build and can confirm that tabs work now, but can’t test any of the gestures stuff (due to lack of USB passthrough in my VM). I’ll double-check general Qt6 issues and post about it in the relevant topic.


Tested on Android (the cd884df package, without the latest changes):

  • I don’t mind having rotate around first finger as an option, I think it’s a valid way of rotating something. But it shouldn’t be the default, since the usual expected behavior is to rotate around the middle.

  • Two Finger Drag defaults to “Pan, Zoom, Rotate Mode”, which works the same as the previous default Zoom and Rotate: Rotate Mode (but sensibly named now?). It’s possible to pan, zoom, and rotate simultaneously. By which I mean it’s pretty much impossible to only zoom or rotate, both always happen, which is really annoying. If possible, it would be nice to have an option so only the one with the greatest current magnitude (the gesture the user currently intended to do) will happen at a time.

  • The other points (touch painting, disabling touch painting to one-finger pan, zoom mode, rotate mode, and three and four finger drag) work fine, except for the aforementioned Zoom Mode no longer allowing pan (which I guess is necessary to allow, with only one two-finger drag shortcut to assign between them).

  • “Rotate: Rotate Mode” didn’t previously allow pan, attempting to do so on a nightly build actually seems to cause a safe assert (or maybe the safe assert is unrelated) (m_d->isRotating in /libs/ui/canvas/kis_coordinates_converter.cpp, line 580). It might be a good idea to test that doing so on the updated version of this branch works fine.

Hi, all!

Thank you very much for testing the branch! I have just merged that into master! :slight_smile: The new touch handling code will be available in the next nightly builds of Krita Next! :slight_smile:

PS:

Can we talk about that on IRC one day? That looks like a feature :slight_smile: