Came across this while working on D8121 (native touch gestures for Mac).
Currently, the pinch zoom gesture zooms into a wrong focus point (it's always the center). This fixes it to actually zoom into the point your touch position is located at.
dkazakov | |
poke1024 |
Krita |
Came across this while working on D8121 (native touch gestures for Mac).
Currently, the pinch zoom gesture zooms into a wrong focus point (it's always the center). This fixes it to actually zoom into the point your touch position is located at.
Lint Skipped |
Unit Tests Skipped |
While you are at it, can you also fix the panning offset part of the gesture (and also the three-finger pan gesture)? It seems to be double of the actual movement. (Not a regression of this patch.)
@alvinhochun I saw that as well, but I wasn't sure what the reason was. Are you on a hidpi screen? Because I suspect this is a QT bug with wrong scaling in the touch screen coordinates when on hidpi. If you're experiencing this on hidpi as well, I can try a fix.
I doubt it's related because it happens both with Qt's high DPI scaling on and off, and also happens when I set the Windows display scaling to 100%. Also it wouldn't make sense that it can get the coordinates properly for calculating the centre point.
No... this is worse than before...
For me on Windows, two finger pinch zoom/pan hasn't changed (obviously), but three-finger pan now jumps a bit when starting the gesture. The offset is still doubled, which means its not actually fixed.
I'd say revert to the original patch, and figure out the pan issue later in a separate task.
(Small correction to the original description: The existing zoom centre point is not always at the center of the canvas, but offset relative to the window position.)
I will mark the patch as "needs changes" so it would not be present in"must review" list :)