summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/flickr')
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml5
1 files changed, 1 insertions, 4 deletions
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index f1b3c7d..2f4df8a 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -66,10 +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
- smooth: !flickable.moving
+ anchors.centerIn: parent; smooth: !flickable.moving
onStatusChanged : {
// Default scale shows the entire image.
if (status == 1 && width != 0) {