From 0f32923c15739ad555e8915cba8afae9c05fd485 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 24 Aug 2010 13:51:20 +1000 Subject: Use SpringAnimation in relevant examples again. --- examples/declarative/toys/clocks/content/Clock.qml | 6 +++--- examples/declarative/toys/tvtennis/tvtennis.qml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/declarative/toys/clocks/content/Clock.qml b/examples/declarative/toys/clocks/content/Clock.qml index eaa14c6..765e8b8 100644 --- a/examples/declarative/toys/clocks/content/Clock.qml +++ b/examples/declarative/toys/clocks/content/Clock.qml @@ -77,7 +77,7 @@ Item { origin.x: 7.5; origin.y: 73; angle: (clock.hours * 30) + (clock.minutes * 0.5) Behavior on angle { - RotationAnimation{ direction: RotationAnimation.Clockwise } + SpringAnimation { spring: 2; damping: 0.2; modulus: 360 } } } } @@ -91,7 +91,7 @@ Item { origin.x: 6.5; origin.y: 83; angle: clock.minutes * 6 Behavior on angle { - RotationAnimation{ direction: RotationAnimation.Clockwise } + SpringAnimation { spring: 2; damping: 0.2; modulus: 360 } } } } @@ -105,7 +105,7 @@ Item { origin.x: 2.5; origin.y: 80; angle: clock.seconds * 6 Behavior on angle { - RotationAnimation{ direction: RotationAnimation.Clockwise } + SpringAnimation { spring: 2; damping: 0.2; modulus: 360 } } } } diff --git a/examples/declarative/toys/tvtennis/tvtennis.qml b/examples/declarative/toys/tvtennis/tvtennis.qml index 2e144ed..4080c87 100644 --- a/examples/declarative/toys/tvtennis/tvtennis.qml +++ b/examples/declarative/toys/tvtennis/tvtennis.qml @@ -87,14 +87,14 @@ Rectangle { color: "Lime" x: 2; width: 20; height: 90 y: ball.direction == 'left' ? ball.y - 45 : page.height/2 -45; - Behavior on y { SpringAnimation{ spring: 1; damping: .1; } } + Behavior on y { SpringAnimation{ velocity: 300 } } } Rectangle { id: rightBat color: "Lime" x: page.width - 22; width: 20; height: 90 y: ball.direction == 'right' ? ball.y - 45 : page.height/2 -45; - Behavior on y { SpringAnimation{ spring: 1; damping: .1; } } + Behavior on y { SpringAnimation{ velocity: 300 } } } // The rest, to make it look realistic, if neither ever scores... -- cgit v0.12