summaryrefslogtreecommitdiffstats
path: root/examples/declarative/border-image/content/MyBorderImage.qml
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-05-12 07:42:52 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-05-12 07:42:52 (GMT)
commit731a2f16578ead0f75f2752e757b138376b2f872 (patch)
tree2b6f9746771992f97cbdb5cf5af8f35ac6928b26 /examples/declarative/border-image/content/MyBorderImage.qml
parent37475bcc4aef3f08c5917f22c7f0f427e4214b91 (diff)
parentb4c589868f278aa9a58ab9afa727dbf0a9442e22 (diff)
downloadQt-731a2f16578ead0f75f2752e757b138376b2f872.zip
Qt-731a2f16578ead0f75f2752e757b138376b2f872.tar.gz
Qt-731a2f16578ead0f75f2752e757b138376b2f872.tar.bz2
Merge remote branch 'mainline/4.7' into 4.7
Conflicts: src/declarative/qml/qdeclarativeengine.cpp tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'examples/declarative/border-image/content/MyBorderImage.qml')
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml25
1 files changed, 19 insertions, 6 deletions
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
index f65f093..b47df7b 100644
--- a/examples/declarative/border-image/content/MyBorderImage.qml
+++ b/examples/declarative/border-image/content/MyBorderImage.qml
@@ -1,6 +1,8 @@
import Qt 4.7
Item {
+ id: container
+
property alias horizontalMode: image.horizontalTileMode
property alias verticalMode: image.verticalTileMode
property alias source: image.source
@@ -11,22 +13,33 @@ Item {
property int maxHeight
property int margin
- id: container
width: 240; height: 240
BorderImage {
- id: image; x: container.width / 2 - width / 2; y: container.height / 2 - height / 2
+ id: image; anchors.centerIn: parent
SequentialAnimation on width {
loops: Animation.Infinite
- NumberAnimation { from: container.minWidth; to: container.maxWidth; duration: 2000; easing.type: "InOutQuad"}
- NumberAnimation { from: container.maxWidth; to: container.minWidth; duration: 2000; easing.type: "InOutQuad" }
+ NumberAnimation {
+ from: container.minWidth; to: container.maxWidth
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ from: container.maxWidth; to: container.minWidth
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
}
SequentialAnimation on height {
loops: Animation.Infinite
- NumberAnimation { from: container.minHeight; to: container.maxHeight; duration: 2000; easing.type: "InOutQuad"}
- NumberAnimation { from: container.maxHeight; to: container.minHeight; duration: 2000; easing.type: "InOutQuad" }
+ NumberAnimation {
+ from: container.minHeight; to: container.maxHeight
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
+ NumberAnimation {
+ from: container.maxHeight; to: container.minHeight
+ duration: 2000; easing.type: Easing.InOutQuad
+ }
}
border.top: container.margin