diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-12 09:55:25 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-12 09:56:04 +0200 |
commit | 29316abe1ad363179cfc2eefe31d085131d1dfd7 (patch) | |
tree | 4f1248046acb0a87de7f8762ec98de3fbc9f47f1 /tests/manual | |
parent | bde8c3cd9583ed9f3bdfc36a8699f56db20a6928 (diff) | |
parent | 47b3b1b10246cad6709c0cd99f02208dbaf6b7c0 (diff) |
Merge remote-tracking branch 'origin/5.10' into wip/new-backend
Change-Id: Iccb35fab856c7d8ec4aaaf021b70a65cfaa564b3
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/pointer/content/FakeFlickable.qml | 55 | ||||
-rw-r--r-- | tests/manual/pointer/singlePointHandlerProperties.qml | 3 |
2 files changed, 23 insertions, 35 deletions
diff --git a/tests/manual/pointer/content/FakeFlickable.qml b/tests/manual/pointer/content/FakeFlickable.qml index 55dafef82e..e8fad99510 100644 --- a/tests/manual/pointer/content/FakeFlickable.qml +++ b/tests/manual/pointer/content/FakeFlickable.qml @@ -62,23 +62,20 @@ Item { property real ylimit: root.height - __contentItem.height function returnToBounds() { - var startAnim = false if (x > 0) { - returnToBoundsAnim.x = 0 - startAnim = true + returnXAnim.to = 0 + returnXAnim.start() } else if (x < xlimit) { - returnToBoundsAnim.x = xlimit - startAnim = true + returnXAnim.to = xlimit + returnXAnim.start() } if (y > 0) { - returnToBoundsAnim.y = 0 - startAnim = true + returnYAnim.to = 0 + returnYAnim.start() } else if (y < ylimit) { - returnToBoundsAnim.y = ylimit - startAnim = true + returnYAnim.to = ylimit + returnYAnim.start() } - if (startAnim) - returnToBoundsAnim.start() } DragHandler { @@ -94,29 +91,19 @@ Item { root.flickEnded() } } - ParallelAnimation { - id: returnToBoundsAnim - property Item target: __contentItem - property int duration: 200 - property real x: 0 - property real y: 0 - - NumberAnimation { - id: xAnim - target: returnToBoundsAnim.target - property: "x" - to: returnToBoundsAnim.x - duration: returnToBoundsAnim.duration - easing.type: Easing.OutQuad - } - NumberAnimation { - id: yAnim - target: returnToBoundsAnim.target - property: "y" - to: returnToBoundsAnim.y - duration: returnToBoundsAnim.duration - easing.type: Easing.OutQuad - } + NumberAnimation { + id: returnXAnim + target: __contentItem + property: "x" + duration: 200 + easing.type: Easing.OutQuad + } + NumberAnimation { + id: returnYAnim + target: __contentItem + property: "y" + duration: 200 + easing.type: Easing.OutQuad } } } diff --git a/tests/manual/pointer/singlePointHandlerProperties.qml b/tests/manual/pointer/singlePointHandlerProperties.qml index f91094ee9e..c51c2eb443 100644 --- a/tests/manual/pointer/singlePointHandlerProperties.qml +++ b/tests/manual/pointer/singlePointHandlerProperties.qml @@ -150,9 +150,10 @@ Rectangle { DragHandler { id: dragHandler target: null + acceptedButtons: Qt.AllButtons onGrabChanged: if (active) { // 'point' is an implicit parameter referencing to a QQuickEventPoint instance console.log("grabbed " + point.pointId + " @ " + point.sceneGrabPos) - grabbingLocationIndicator.createObject(root, {"x": point.sceneGrabPos.x, "y": point.sceneGrabPos.y - 16}) + grabbingLocationIndicator.createObject(root, {"x": point.sceneGrabPosition.x, "y": point.sceneGrabPosition.y - 16}) } onPointChanged: { // Here, 'point' is referring to the property of the DragHandler |