aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/handlers
diff options
context:
space:
mode:
authorShawn Rutledge <[email protected]>2023-02-16 09:12:47 +0100
committerQt Cherry-pick Bot <[email protected]>2023-02-17 23:14:41 +0000
commit512904abb577486d627423ee2a205e5bd724a8c0 (patch)
tree52aa547de867ddb2622696608a5c3691d9ebfa3a /src/quick/handlers
parent352c1e1243716ede962f2a8b855fd28603bfed4d (diff)
Fix and test PinchHandler native-gesture scaling
We didn't have test coverage for several gesture events in a row (the usual case in reality), nor for RotateNativeGesture at all. Amends a432970b258edb9ff041d221b2155df30cad4799 which incorrectly treated QNativeGestureEvent::value() as an absolute zoom rather than a delta. Fixes: QTBUG-111204 Change-Id: Ib95cab5cd3f97229abac1668e59d20ce50d24975 Reviewed-by: Doris Verria <[email protected]> (cherry picked from commit a05cbaaae505dba2546c593e22fe2f9047c0de4b) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r--src/quick/handlers/qquickpinchhandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp
index 00a6e8c8ee..4880457c63 100644
--- a/src/quick/handlers/qquickpinchhandler.cpp
+++ b/src/quick/handlers/qquickpinchhandler.cpp
@@ -524,7 +524,7 @@ void QQuickPinchHandler::handlePointerEventImpl(QPointerEvent *event)
emit updated();
return;
case Qt::ZoomNativeGesture:
- setActiveScale(1 + gesture->value());
+ setActiveScale(m_scaleAxis.activeValue() * (1 + gesture->value()));
break;
case Qt::RotateNativeGesture:
setActiveRotation(m_rotationAxis.activeValue() + gesture->value());