From e7af6072770842b5a1f6151304961b86ca08c8f6 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Wed, 24 Jun 2009 13:41:00 +1000 Subject: Smooth-scale Big Image while static. --- demos/declarative/flickr/content/ImageDetails.qml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml index ccc91cb..ed60d17 100644 --- a/demos/declarative/flickr/content/ImageDetails.qml +++ b/demos/declarative/flickr/content/ImageDetails.qml @@ -89,6 +89,7 @@ Flipable { // Center image if it is smaller than the flickable area. x: ImageContainer.width > width*scale ? (ImageContainer.width - width*scale) / 2 : 0 y: ImageContainer.height > height*scale ? (ImageContainer.height - height*scale) / 2 : 0 + smooth: !Flick.moving onStatusChanged : { // Default scale shows the entire image. if (status == 0 && width != 0) { @@ -135,7 +136,19 @@ Flipable { transitions: [ Transition { - NumericAnimation { easing: "easeInOutQuad"; properties: "rotation"; duration: 500 } + SequentialAnimation { + SetPropertyAction { + target: BigImage + property: "smooth" + value: false + } + NumericAnimation { easing: "easeInOutQuad"; properties: "rotation"; duration: 500 } + SetPropertyAction { + target: BigImage + property: "smooth" + value: !Flick.moving + } + } } ] } -- cgit v0.12