equal
deleted
inserted
replaced
63 } |
63 } |
64 |
64 |
65 // The shadow for the smiley face |
65 // The shadow for the smiley face |
66 Image { |
66 Image { |
67 anchors.horizontalCenter: parent.horizontalCenter |
67 anchors.horizontalCenter: parent.horizontalCenter |
68 source: "images/shadow.png"; y: smiley.minHeight + 58 |
68 y: smiley.minHeight + 58 |
|
69 source: "images/shadow.png" |
69 |
70 |
70 // The scale property depends on the y position of the smiley face. |
71 // The scale property depends on the y position of the smiley face. |
71 scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight) |
72 scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight) |
72 } |
73 } |
73 |
74 |
75 id: smiley |
76 id: smiley |
76 property int maxHeight: window.height / 3 |
77 property int maxHeight: window.height / 3 |
77 property int minHeight: 2 * window.height / 3 |
78 property int minHeight: 2 * window.height / 3 |
78 |
79 |
79 anchors.horizontalCenter: parent.horizontalCenter |
80 anchors.horizontalCenter: parent.horizontalCenter |
80 source: "images/face-smile.png"; y: minHeight |
81 y: minHeight |
|
82 source: "images/face-smile.png" |
81 |
83 |
82 // Animate the y property. Setting loops to Animation.Infinite makes the |
84 // Animate the y property. Setting loops to Animation.Infinite makes the |
83 // animation repeat indefinitely, otherwise it would only run once. |
85 // animation repeat indefinitely, otherwise it would only run once. |
84 SequentialAnimation on y { |
86 SequentialAnimation on y { |
85 loops: Animation.Infinite |
87 loops: Animation.Infinite |