aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/pointer
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-06-22 16:37:32 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-06-27 15:31:07 +0000
commitb4d31c9ff5f0c5821ea127c663532d9fc2cae43e (patch)
treee8cbf769123e2c59a3d42fd4d9f1ae67b722a15e /tests/manual/pointer
parenta1adcf34f8784d05467cf3598064a3e83842fdc0 (diff)
PinchHandler: rename scale to activeScale; scale means target scale
If you want to set target: null and then bind scale to some sort of rendering scale property directly, it's a lot less trouble if the scale property does not keep changing back to 1.0 every time a gesture begins. Added an activeScale property to represent that value, the one that the scale property had before. Task-number: QTBUG-68941 Change-Id: Idcb6735d915a523afe1a948609080af7a83f82ad Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/manual/pointer')
-rw-r--r--tests/manual/pointer/map.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/manual/pointer/map.qml b/tests/manual/pointer/map.qml
index 6ab6badfd0..880f184adb 100644
--- a/tests/manual/pointer/map.qml
+++ b/tests/manual/pointer/map.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the manual tests of the Qt Toolkit.
@@ -48,6 +48,12 @@ Item {
source: "resources/map.svgz"
Component.onCompleted: { width = implicitWidth; height = implicitHeight }
}
+
+ Text {
+ anchors.centerIn: parent
+ text: image.sourceSize.width + " x " + image.sourceSize.height +
+ " scale " + map.scale.toFixed(2) + " active scale " + pinch.activeScale.toFixed(2)
+ }
}
PinchHandler {