summaryrefslogtreecommitdiffstats
path: root/flick
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-08-06 14:09:50 +0200
committerThomas Zander <t.zander@nokia.com>2010-08-06 14:09:50 +0200
commitde9d7184fa5408d90ac06f46a32f321cd0e186ca (patch)
tree808ccefc9f20c9d67beec62a3343f8fb996fc229 /flick
parentc825d3d810a631997370600966bbe74b8727d996 (diff)
Follow changes in gesture area to now have onUpdated etc.
Diffstat (limited to 'flick')
-rw-r--r--flick/main.qml10
1 files changed, 3 insertions, 7 deletions
diff --git a/flick/main.qml b/flick/main.qml
index e06b754..949c652 100644
--- a/flick/main.qml
+++ b/flick/main.qml
@@ -45,21 +45,17 @@ Rectangle {
anchors.fill: parent
Tap {
- when: gesture.state == Qt.GestureStarted
- script: {
+ onStarted: {
xAnim.stop();
yAnim.stop();
}
}
Pan {
- script: {
+ onStarted: {
list.y += gesture.delta.y;
list.x += gesture.delta.x;
}
- }
- Pan {
- when: gesture.state == Qt.GestureFinished
- script: {
+ onFinished: {
if (gesture.horizontalVelocity != 0 && gesture.offset.x != 0) {
xAnim.to = list.x + gesture.offset.x;
xAnim.duration = 10000.0 * gesture.offset.x / gesture.horizontalVelocity;