diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-02-16 09:12:47 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-02-17 22:06:22 +0100 |
commit | a05cbaaae505dba2546c593e22fe2f9047c0de4b (patch) | |
tree | ae70b6c37aeb34a423ca2f93f08cc4aa860c3345 /src/quick/handlers | |
parent | 7f8e61e8a544519026fa5c9da59b1c10de278a92 (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.
Pick-to: 6.5
Fixes: QTBUG-111204
Change-Id: Ib95cab5cd3f97229abac1668e59d20ce50d24975
Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src/quick/handlers')
-rw-r--r-- | src/quick/handlers/qquickpinchhandler.cpp | 2 |
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()); |