summaryrefslogtreecommitdiffstats
path: root/examples/declarative/animation
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-06-21 05:37:41 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-06-22 01:22:35 (GMT)
commitc8968fd143e079d4d2b79c88132caaffbefedd7d (patch)
treeb16577cba1077738e8095c0ddb8faca20a17b1fb /examples/declarative/animation
parentd9e49c4399e506c878ce5125d4edcf384b867b26 (diff)
downloadQt-c8968fd143e079d4d2b79c88132caaffbefedd7d.zip
Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.tar.gz
Qt-c8968fd143e079d4d2b79c88132caaffbefedd7d.tar.bz2
Clean up some examples
Diffstat (limited to 'examples/declarative/animation')
-rw-r--r--examples/declarative/animation/basics/property-animation.qml6
-rw-r--r--examples/declarative/animation/behaviors/behavior-example.qml7
2 files changed, 7 insertions, 6 deletions
diff --git a/examples/declarative/animation/basics/property-animation.qml b/examples/declarative/animation/basics/property-animation.qml
index 0fb253a..69d166a 100644
--- a/examples/declarative/animation/basics/property-animation.qml
+++ b/examples/declarative/animation/basics/property-animation.qml
@@ -65,7 +65,8 @@ Item {
// The shadow for the smiley face
Image {
anchors.horizontalCenter: parent.horizontalCenter
- source: "images/shadow.png"; y: smiley.minHeight + 58
+ y: smiley.minHeight + 58
+ source: "images/shadow.png"
// The scale property depends on the y position of the smiley face.
scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
@@ -77,7 +78,8 @@ Item {
property int minHeight: 2 * window.height / 3
anchors.horizontalCenter: parent.horizontalCenter
- source: "images/face-smile.png"; y: minHeight
+ y: minHeight
+ source: "images/face-smile.png"
// Animate the y property. Setting loops to Animation.Infinite makes the
// animation repeat indefinitely, otherwise it would only run once.
diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/declarative/animation/behaviors/behavior-example.qml
index 91845fc..d187fbf 100644
--- a/examples/declarative/animation/behaviors/behavior-example.qml
+++ b/examples/declarative/animation/behaviors/behavior-example.qml
@@ -87,12 +87,12 @@ Rectangle {
border.width: 4; border.color: "white"
color: "firebrick"
- // Setting an 'elastic' behavior on the focusRect's x property.
+ // Set an 'elastic' behavior on the focusRect's x property.
Behavior on x {
NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
}
- // Setting an 'elastic' behavior on the focusRect's y property.
+ // Set an 'elastic' behavior on the focusRect's y property.
Behavior on y {
NumberAnimation { easing.type: Easing.OutElastic; easing.amplitude: 3.0; easing.period: 2.0; duration: 300 }
}
@@ -104,12 +104,11 @@ Rectangle {
color: "white"
font.pixelSize: 16; font.bold: true
- // Setting a behavior on the focusText's x property:
+ // Set a behavior on the focusText's x property:
// Set the opacity to 0, set the new text value, then set the opacity back to 1.
Behavior on text {
SequentialAnimation {
NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
- PropertyAction { }
NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
}
}