diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-01 06:31:32 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-01 06:31:32 (GMT) |
commit | d5449c3cc85624b50e6a6fcabc6ad96b79d4bd0a (patch) | |
tree | a9dd63dffccb1ed3bf6f6ba35da686e3b0da8d14 | |
parent | bec22cbfb255da34afe99c4cec30fc13cc40d900 (diff) | |
download | Qt-d5449c3cc85624b50e6a6fcabc6ad96b79d4bd0a.zip Qt-d5449c3cc85624b50e6a6fcabc6ad96b79d4bd0a.tar.gz Qt-d5449c3cc85624b50e6a6fcabc6ad96b79d4bd0a.tar.bz2 |
Keep image centered in ImageDetails.
-rw-r--r-- | demos/declarative/flickr/mobile/ImageDetails.qml | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 8749b4c..55061db 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -66,9 +66,7 @@ Flipable { Image { id: bigImage; source: container.photoUrl; scale: slider.value - // 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 + anchors.centerIn: parent smooth: !flickable.moving onStatusChanged : { // Default scale shows the entire image. |