diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-02-26 02:01:05 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-02-26 02:01:05 (GMT) |
commit | 5fb329228bd1cd1126428b045a41a4a9c1033dc5 (patch) | |
tree | f93828abe89818729d717d3e9cdae94929f6fb13 /demos/declarative/flickr | |
parent | 3218d437a13ac82f65abcea0db099f54504c8875 (diff) | |
download | Qt-5fb329228bd1cd1126428b045a41a4a9c1033dc5.zip Qt-5fb329228bd1cd1126428b045a41a4a9c1033dc5.tar.gz Qt-5fb329228bd1cd1126428b045a41a4a9c1033dc5.tar.bz2 |
Renamed Flickable viewportXXX properties contentXXX
A viewport is the thing you look through, not what you look at.
Diffstat (limited to 'demos/declarative/flickr')
-rw-r--r-- | demos/declarative/flickr/common/ImageDetails.qml | 12 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/ImageDetails.qml | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/demos/declarative/flickr/common/ImageDetails.qml b/demos/declarative/flickr/common/ImageDetails.qml index ab94d7a..f91b365 100644 --- a/demos/declarative/flickr/common/ImageDetails.qml +++ b/demos/declarative/flickr/common/ImageDetails.qml @@ -50,7 +50,7 @@ Flipable { LikeOMeter { x: 40; y: 250; rating: container.rating } Flickable { id: flickable; x: 220; width: 480; height: 210; y: 130; clip: true - viewportWidth: 480; viewportHeight: descriptionText.height + contentWidth: 480; contentHeight: descriptionText.height WebView { id: descriptionText; width: parent.width html: "<style TYPE=\"text/css\">body {color: white;} a:link {color: cyan; text-decoration: underline; }</style>" + container.photoDescription } @@ -84,7 +84,7 @@ Flipable { Flickable { id: flick; width: container.width - 10; height: container.height - 10 x: 5; y: 5; clip: true; - viewportWidth: imageContainer.width; viewportHeight: imageContainer.height + contentWidth: imageContainer.width; contentHeight: imageContainer.height Item { id: imageContainer @@ -122,12 +122,12 @@ Flipable { id: slider; x: 25; y: 374; visible: { bigImage.status == 1 && maximum > minimum } onValueChanged: { if (bigImage.width * value > flick.width) { - var xoff = (flick.width/2 + flick.viewportX) * value / prevScale; - flick.viewportX = xoff - flick.width/2; + var xoff = (flick.width/2 + flick.contentX) * value / prevScale; + flick.contentX = xoff - flick.width/2; } if (bigImage.height * value > flick.height) { - var yoff = (flick.height/2 + flick.viewportY) * value / prevScale; - flick.viewportY = yoff - flick.height/2; + var yoff = (flick.height/2 + flick.contentY) * value / prevScale; + flick.contentY = yoff - flick.height/2; } prevScale = value; } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 415764e..8749b4c 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -57,7 +57,7 @@ Flipable { Common.Progress { anchors.centerIn: parent; width: 200; height: 18; progress: bigImage.progress; visible: bigImage.status!=1 } Flickable { id: flickable; anchors.fill: parent; clip: true - viewportWidth: imageContainer.width; viewportHeight: imageContainer.height + contentWidth: imageContainer.width; contentHeight: imageContainer.height Item { id: imageContainer @@ -97,12 +97,12 @@ Flipable { } onValueChanged: { if (bigImage.width * value > flickable.width) { - var xoff = (flickable.width/2 + flickable.viewportX) * value / prevScale; - flickable.viewportX = xoff - flickable.width/2; + var xoff = (flickable.width/2 + flickable.contentX) * value / prevScale; + flickable.contentX = xoff - flickable.width/2; } if (bigImage.height * value > flickable.height) { - var yoff = (flickable.height/2 + flickable.viewportY) * value / prevScale; - flickable.viewportY = yoff - flickable.height/2; + var yoff = (flickable.height/2 + flickable.contentY) * value / prevScale; + flickable.contentY = yoff - flickable.height/2; } prevScale = value; } |