Merge lp:~martin-borho/ubuntu-weather-app/animations-stopper into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Martin Borho on 2013-06-17
Status: Merged
Approved by: Raúl Yeguas on 2013-06-17
Approved revision: 38
Merged at revision: 43
Proposed branch: lp:~martin-borho/ubuntu-weather-app/animations-stopper
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 279 lines (+59/-36)
1 file modified
components/WeatherConditionIconComponent.qml (+59/-36)
To merge this branch: bzr merge lp:~martin-borho/ubuntu-weather-app/animations-stopper
Reviewer Review Type Date Requested Status
Raúl Yeguas 2013-06-17 Approve on 2013-06-17
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2013-06-17
Review via email: mp+169832@code.launchpad.net

Commit message

Stops animated icons to run forever.

Description of the change

Stops animated icons to run forever.

To post a comment you must log in.
Raúl Yeguas (neokore) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/WeatherConditionIconComponent.qml'
2--- components/WeatherConditionIconComponent.qml 2013-05-18 10:57:14 +0000
3+++ components/WeatherConditionIconComponent.qml 2013-06-17 15:37:30 +0000
4@@ -58,7 +58,7 @@
5 source: "../resources/images/snow.png"
6 fillMode: Image.PreserveAspectFit
7 opacity: 0
8- RotationAnimation { id: snowflake1_anim; running: false; targets: snowflake1; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
9+ //RotationAnimation { id: snowflake1_anim; running: false; targets: snowflake1; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
10 }
11 Image {
12 id: snowflake2
13@@ -73,7 +73,7 @@
14 source: "../resources/images/snow.png"
15 fillMode: Image.PreserveAspectFit
16 opacity: 0
17- RotationAnimation { id: snowflake2_anim; running: false; targets: snowflake2; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
18+ //RotationAnimation { id: snowflake2_anim; running: false; targets: snowflake2; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
19 }
20 Image {
21 id: snowflake3
22@@ -88,7 +88,7 @@
23 source: "../resources/images/snow.png"
24 fillMode: Image.PreserveAspectFit
25 opacity: 0
26- RotationAnimation { id: snowflake3_anim; running: false; targets: snowflake3; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
27+ //RotationAnimation { id: snowflake3_anim; running: false; targets: snowflake3; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
28 }
29 Image {
30 id: cloud1
31@@ -262,13 +262,14 @@
32 targets: sun
33 properties: "rotation"
34 from: 0
35- to: 360
36- loops: Animation.Infinite
37- duration: 60000
38+ to: 10
39+ //loops: Animation.Infinite
40+ duration:1000
41 }
42 ParallelAnimation{
43 id: anim_02
44 running: false
45+ paused: (running && !weatherCondition.visible)
46 SequentialAnimation {
47 loops: Animation.Infinite
48 ParallelAnimation{
49@@ -284,6 +285,7 @@
50 }
51 SequentialAnimation {
52 loops: Animation.Infinite
53+ paused: (running && !weatherCondition.visible)
54 PauseAnimation {duration: 17000}
55 ParallelAnimation{
56 SequentialAnimation {
57@@ -300,7 +302,7 @@
58 id: anim_11
59 running: false
60 loops: Animation.Infinite
61-
62+ paused: (running && !weatherCondition.visible)
63 SequentialAnimation{
64 PauseAnimation { duration: 2000 }
65 NumberAnimation {targets: cloud1Glow; properties: "opacity"; from: 0; to: 1; duration: 10}
66@@ -328,40 +330,42 @@
67 ParallelAnimation {
68 id: anim_13
69 running: false
70- SequentialAnimation {
71- loops: Animation.Infinite
72+ paused: (running && !weatherCondition.visible)
73+ SequentialAnimation {
74+ //loops: Animation.Infinite
75+
76+ //PauseAnimation { duration: 1000 }
77+ ParallelAnimation{
78+ NumberAnimation {target: snowflake1; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height*0.83; duration: 2000}
79+ NumberAnimation {target: snowflake1; properties: "anchors.leftMargin"; from:weatherCondition.width/6; to:weatherCondition.height/15; duration: 2000}
80+ NumberAnimation {target: snowflake1; easing.type: Easing.InQuint; properties: "opacity"; from: 0; to: 1; duration: 2000}
81+ }
82+ }
83+ SequentialAnimation {
84+ //loops: Animation.Infinite
85
86 PauseAnimation { duration: 1000 }
87- ParallelAnimation{
88- NumberAnimation {target: snowflake1; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
89- NumberAnimation {target: snowflake1; properties: "anchors.leftMargin"; from:weatherCondition.width/6; to:weatherCondition.height/15; duration: 4000}
90- NumberAnimation {target: snowflake1; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
91- }
92- }
93- SequentialAnimation {
94- loops: Animation.Infinite
95-
96- PauseAnimation { duration: 3000 }
97- ParallelAnimation {
98- NumberAnimation {target: snowflake2; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
99- NumberAnimation {target: snowflake2; properties: "anchors.leftMargin"; from:weatherCondition.width/2; to:weatherCondition.width/2.5; duration: 4000}
100- NumberAnimation {target: snowflake2; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
101- }
102- }
103- SequentialAnimation {
104- loops: Animation.Infinite
105-
106- PauseAnimation { duration: 2000 }
107- ParallelAnimation {
108- NumberAnimation {target: snowflake3; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
109- NumberAnimation {target: snowflake3; properties: "anchors.leftMargin"; from:weatherCondition.width/1.2; to:weatherCondition.width/1.4; duration: 4000}
110- NumberAnimation {target: snowflake3; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
111+ ParallelAnimation {
112+ NumberAnimation {target: snowflake2; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height*0.8; duration: 2000}
113+ NumberAnimation {target: snowflake2; properties: "anchors.leftMargin"; from:weatherCondition.width/2; to:weatherCondition.width/2.5; duration: 2000}
114+ NumberAnimation {target: snowflake2; easing.type: Easing.InQuint; properties: "opacity"; from: 0; to: 1; duration: 2000}
115+ }
116+ }
117+ SequentialAnimation {
118+ //loops: Animation.Infinite
119+
120+ PauseAnimation { duration: 500 }
121+ ParallelAnimation {
122+ NumberAnimation {target: snowflake3; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height*0.86; duration: 2000}
123+ NumberAnimation {target: snowflake3; properties: "anchors.leftMargin"; from:weatherCondition.width/1.2; to:weatherCondition.width/1.4; duration: 2000}
124+ NumberAnimation {target: snowflake3; easing.type: Easing.InQuint; properties: "opacity"; from: 0; to: 1; duration: 2000}
125 }
126 }
127 }
128 ParallelAnimation{
129 id: anim_50
130 running: false
131+ paused: (running && !weatherCondition.visible)
132 SequentialAnimation {
133 loops: Animation.Infinite
134 ParallelAnimation{
135@@ -391,26 +395,31 @@
136 // CONDITION TRANSITION ANIMATIONS
137 ParallelAnimation {
138 id: anim_sunIn
139+ paused: (running && !weatherCondition.visible)
140 NumberAnimation { targets: sun; properties: "opacity"; to: 1; duration: 1000 }
141 ScriptAction {script:{sun.anchors.horizontalCenterOffset=0;sun.anchors.topMargin=0;__sun = true;anim_01.start();}}
142 }
143 ParallelAnimation {
144 id: anim_moonIn
145+ paused: (running && !weatherCondition.visible)
146 NumberAnimation { targets: moon; properties: "opacity"; to: 1; duration: 1000 }
147 ScriptAction {script:{moon.anchors.horizontalCenterOffset=0;moon.anchors.topMargin=0;__moon = true;}}
148 }
149 ParallelAnimation {
150 id: anim_sunOut
151+ paused: (running && !weatherCondition.visible)
152 NumberAnimation { targets: sun; properties: "opacity"; to: 0; duration: 1000 }
153 ScriptAction {script:{__sun = false;anim_01.stop();}}
154 }
155 ParallelAnimation {
156 id: anim_moonOut
157+ paused: (running && !weatherCondition.visible)
158 NumberAnimation { targets: moon; properties: "opacity"; to: 0; duration: 1000 }
159 ScriptAction {script:__moon = false;}
160 }
161 SequentialAnimation {
162 id: anim_moon2sun
163+ paused: (running && !weatherCondition.visible)
164 ParallelAnimation {
165 NumberAnimation { targets: moon; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }
166 NumberAnimation { easing.type: Easing.InQuad; targets: moon; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }
167@@ -425,6 +434,7 @@
168 }
169 SequentialAnimation {
170 id: anim_sun2moon
171+ paused: (running && !weatherCondition.visible)
172 ParallelAnimation {
173 NumberAnimation { targets: sun; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }
174 NumberAnimation { easing.type: Easing.InQuad; targets: sun; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }
175@@ -439,6 +449,7 @@
176 }
177 ParallelAnimation {
178 id: anim_fewCloudsIn
179+ paused: (running && !weatherCondition.visible)
180 SequentialAnimation{
181 PauseAnimation {duration: 1000}
182 ScriptAction {script:{
183@@ -449,6 +460,7 @@
184 }
185 ParallelAnimation {
186 id: anim_fewCloudsOut
187+ paused: (running && !weatherCondition.visible)
188 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000}
189 NumberAnimation { targets: cloud2; properties: "opacity"; to: 0; duration: 1000}
190 SequentialAnimation{
191@@ -461,6 +473,7 @@
192 }
193 ParallelAnimation {
194 id: anim_scatCloudsIn
195+ paused: (running && !weatherCondition.visible)
196 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }
197 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }
198 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }
199@@ -471,6 +484,7 @@
200 }
201 ParallelAnimation {
202 id: anim_scatCloudsOut
203+ paused: (running && !weatherCondition.visible)
204 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }
205 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }
206 NumberAnimation { targets: cloud2; properties: "anchors.leftMargin"; from: weatherCondition.width/-15; to: weatherCondition.width/-1.5; duration: 1000 }
207@@ -479,6 +493,7 @@
208 }
209 ParallelAnimation {
210 id: anim_brokenCloudsIn
211+ paused: (running && !weatherCondition.visible)
212 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }
213 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }
214 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }
215@@ -489,6 +504,7 @@
216 }
217 ParallelAnimation {
218 id: anim_brokenCloudsOut
219+ paused: (running && !weatherCondition.visible)
220 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }
221 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }
222 NumberAnimation { targets: cloud_dark1; properties: "anchors.leftMargin"; from: weatherCondition.height/-15; to: weatherCondition.width/-1.5; duration: 1000 }
223@@ -497,22 +513,26 @@
224 }
225 ParallelAnimation {
226 id: anim_rainIn
227+ paused: (running && !weatherCondition.visible)
228 NumberAnimation { targets: rain1; properties: "opacity"; to: 1; duration: 1000 }
229 NumberAnimation { targets: rain2; properties: "opacity"; to: 1; duration: 1000 }
230 ScriptAction {script:__rain = true;}
231 }
232 ParallelAnimation {
233 id: anim_rainOut
234+ paused: (running && !weatherCondition.visible)
235 NumberAnimation { targets: rain1; properties: "opacity"; to: 0; duration: 1000 }
236 NumberAnimation { targets: rain2; properties: "opacity"; to: 0; duration: 1000 }
237 ScriptAction {script:__rain = false;}
238 }
239 ParallelAnimation {
240 id: anim_stormIn
241+ paused: (running && !weatherCondition.visible)
242 ScriptAction {script:{__storm = true; anim_11.restart();}}
243 }
244 ParallelAnimation {
245 id: anim_stormOut
246+ paused: (running && !weatherCondition.visible)
247 NumberAnimation { targets: lightning; properties: "opacity"; to: 0; duration: 1 }
248 NumberAnimation { targets: lightningfx; properties: "opacity"; to: 0; duration: 1 }
249 NumberAnimation { targets: lightningGlow; properties: "opacity"; to: 0; duration: 1 }
250@@ -522,23 +542,26 @@
251 }
252 ParallelAnimation {
253 id: anim_snowIn
254- ScriptAction {script:{__snow = true; snowflake1_anim.start(); snowflake2_anim.start(); snowflake3_anim.start(); anim_13.restart();}}
255+ paused: (running && !weatherCondition.visible)
256+ ScriptAction {script:{__snow = true; /*snowflake1_anim.start(); snowflake2_anim.start(); snowflake3_anim.start();*/ anim_13.start();}}
257 }
258 ParallelAnimation {
259 id: anim_snowOut
260+ paused: (running && !weatherCondition.visible)
261 NumberAnimation {targets: snowflake1; properties: "opacity"; to:0; duration: 1000}
262 NumberAnimation {targets: snowflake2; properties: "opacity"; to:0; duration: 1000}
263 NumberAnimation {targets: snowflake3; properties: "opacity"; to:0; duration: 1000}
264- ScriptAction {script:{__snow = false; snowflake1_anim.stop(); snowflake2_anim.stop(); snowflake3_anim.stop(); anim_13.stop();}}
265+ ScriptAction {script:{__snow = false; /*snowflake1_anim.stop(); snowflake2_anim.stop(); snowflake3_anim.stop();*/ /*anim_13.stop();*/}}
266 }
267 SequentialAnimation {
268 id: anim_fogIn
269-
270+ paused: (running && !weatherCondition.visible)
271 PauseAnimation {duration: 1000}
272 ScriptAction {script:{anim_50.restart(); script:__fog = true;}}
273 }
274 ParallelAnimation {
275 id: anim_fogOut
276+ paused: (running && !weatherCondition.visible)
277 NumberAnimation { targets: fogBlur1; properties: "opacity"; to: 0; duration: 1000}
278 NumberAnimation { targets: fogBlur2; properties: "opacity"; to: 0; duration: 1000}
279 SequentialAnimation{

Subscribers

People subscribed via source and target branches