aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickflickable/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickflickable/data')
-rw-r--r--tests/auto/quick/qquickflickable/data/rebound.qml41
-rw-r--r--tests/auto/quick/qquickflickable/data/resize.qml10
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickflickable/data/rebound.qml b/tests/auto/quick/qquickflickable/data/rebound.qml
new file mode 100644
index 0000000000..d46f9dd189
--- /dev/null
+++ b/tests/auto/quick/qquickflickable/data/rebound.qml
@@ -0,0 +1,41 @@
+import QtQuick 2.0
+
+Flickable {
+ id: flick
+
+ property int transitionDuration: 100
+ property bool transitionEnabled: true
+ property int transitionsStarted
+
+ width: 200
+ height: 200
+
+ contentWidth: width * 1.25
+ contentHeight: width * 1.25
+
+ rebound: Transition {
+ objectName: "rebound"
+ enabled: flick.transitionEnabled
+ SequentialAnimation {
+ PropertyAction { target: flick; property: "transitionsStarted"; value: flick.transitionsStarted + 1 }
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutElastic
+ duration: flick.transitionDuration
+ }
+ }
+ }
+
+ Grid {
+ columns: 2
+ Repeater {
+ model: 4
+ Rectangle {
+ width: flick.contentWidth/2
+ height: flick.contentHeight/2
+ color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1)
+ }
+ }
+ }
+}
+
diff --git a/tests/auto/quick/qquickflickable/data/resize.qml b/tests/auto/quick/qquickflickable/data/resize.qml
index 1a9ef54107..2f7ae7b8bb 100644
--- a/tests/auto/quick/qquickflickable/data/resize.qml
+++ b/tests/auto/quick/qquickflickable/data/resize.qml
@@ -18,6 +18,16 @@ Rectangle {
contentWidth: 300
contentHeight: 300
+ rebound: setRebound ? boundsTransition : null
+ Transition {
+ id: boundsTransition
+ objectName: "rebound"
+ NumberAnimation {
+ properties: "x,y"
+ easing.type: Easing.OutElastic
+ }
+ }
+
Rectangle {
width: flick.contentWidth
height: flick.contentHeight