summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-09 14:05:20 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-03-09 14:05:20 (GMT)
commitf5c9262ab59bdb4e35e7d26ea52b72d65b178cf2 (patch)
tree56b9e94aea9571cda947dca8ca5bfc000c6effed /demos/declarative/flickr
parentd85b149a5c7f3532f8e1a593a79298c9ae38a95f (diff)
parentbb966fe9dd8be25530da5a66727c7fe2123fafbb (diff)
downloadQt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.zip
Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.tar.gz
Qt-f5c9262ab59bdb4e35e7d26ea52b72d65b178cf2.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'demos/declarative/flickr')
-rw-r--r--demos/declarative/flickr/common/ImageDetails.qml5
-rw-r--r--demos/declarative/flickr/common/Loading.qml2
-rw-r--r--demos/declarative/flickr/flickr-mobile-90.qml1
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml2
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml7
-rw-r--r--demos/declarative/flickr/mobile/ListDelegate.qml4
6 files changed, 9 insertions, 12 deletions
diff --git a/demos/declarative/flickr/common/ImageDetails.qml b/demos/declarative/flickr/common/ImageDetails.qml
index f91b365..862eeb1 100644
--- a/demos/declarative/flickr/common/ImageDetails.qml
+++ b/demos/declarative/flickr/common/ImageDetails.qml
@@ -1,4 +1,5 @@
import Qt 4.6
+import org.webkit 1.0
Flipable {
id: container
@@ -93,9 +94,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: !flick.moving
onStatusChanged : {
// Default scale shows the entire image.
diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml
index 174cd21..938a080 100644
--- a/demos/declarative/flickr/common/Loading.qml
+++ b/demos/declarative/flickr/common/Loading.qml
@@ -2,7 +2,7 @@ import Qt 4.6
Image {
id: loading; source: "pics/loading.png"; transformOrigin: "Center"
- rotation: NumberAnimation {
+ NumberAnimation on rotation {
from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
}
}
diff --git a/demos/declarative/flickr/flickr-mobile-90.qml b/demos/declarative/flickr/flickr-mobile-90.qml
index 259ff10..9fec242 100644
--- a/demos/declarative/flickr/flickr-mobile-90.qml
+++ b/demos/declarative/flickr/flickr-mobile-90.qml
@@ -5,6 +5,7 @@ Item {
Loader {
y: 320; rotation: -90
+ transformOrigin: Item.TopLeft
source: "flickr-mobile.qml"
}
}
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index 7634573..291d874 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -23,7 +23,7 @@
Item {
anchors.centerIn: parent
scale: 0.0
- scale: Behavior { NumberAnimation { easing.type: "InOutQuad"} }
+ Behavior on scale { NumberAnimation { easing.type: "InOutQuad"} }
id: scaleMe
Rectangle { height: 79; width: 79; id: blackRect; anchors.centerIn: parent; color: "black"; smooth: true }
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index 8749b4c..2f4df8a 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -45,7 +45,7 @@ Flipable {
Text { color: "white"; elide: Text.ElideRight; text: "<b>Author:</b> " + container.photoAuthor }
Text { color: "white"; elide: Text.ElideRight; text: "<b>Published:</b> " + container.photoDate }
Text { color: "white"; elide: Text.ElideRight; text: container.photoTags == "" ? "" : "<b>Tags:</b> " }
- Text { color: "white"; elide: Text.ElideRight; elide: Text.ElideRight; text: container.photoTags }
+ Text { color: "white"; elide: Text.ElideRight; text: container.photoTags }
}
}
@@ -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) {
diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml
index 75c4572..381664b 100644
--- a/demos/declarative/flickr/mobile/ListDelegate.qml
+++ b/demos/declarative/flickr/mobile/ListDelegate.qml
@@ -15,8 +15,8 @@ Component {
Column {
x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2
Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" }
- Text { text: photoAuthor; color: "white"; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
- Text { text: photoDate; color: "white"; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: photoAuthor; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
+ Text { text: photoDate; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
}
}
}