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

Proposed by Martin Borho
Status: Merged
Approved by: Raúl Yeguas
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 Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
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.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Raúl Yeguas (neokore) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'components/WeatherConditionIconComponent.qml'
--- components/WeatherConditionIconComponent.qml 2013-05-18 10:57:14 +0000
+++ components/WeatherConditionIconComponent.qml 2013-06-17 15:37:30 +0000
@@ -58,7 +58,7 @@
58 source: "../resources/images/snow.png"58 source: "../resources/images/snow.png"
59 fillMode: Image.PreserveAspectFit59 fillMode: Image.PreserveAspectFit
60 opacity: 060 opacity: 0
61 RotationAnimation { id: snowflake1_anim; running: false; targets: snowflake1; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}61 //RotationAnimation { id: snowflake1_anim; running: false; targets: snowflake1; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
62 }62 }
63 Image {63 Image {
64 id: snowflake264 id: snowflake2
@@ -73,7 +73,7 @@
73 source: "../resources/images/snow.png"73 source: "../resources/images/snow.png"
74 fillMode: Image.PreserveAspectFit74 fillMode: Image.PreserveAspectFit
75 opacity: 075 opacity: 0
76 RotationAnimation { id: snowflake2_anim; running: false; targets: snowflake2; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}76 //RotationAnimation { id: snowflake2_anim; running: false; targets: snowflake2; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
77 }77 }
78 Image {78 Image {
79 id: snowflake379 id: snowflake3
@@ -88,7 +88,7 @@
88 source: "../resources/images/snow.png"88 source: "../resources/images/snow.png"
89 fillMode: Image.PreserveAspectFit89 fillMode: Image.PreserveAspectFit
90 opacity: 090 opacity: 0
91 RotationAnimation { id: snowflake3_anim; running: false; targets: snowflake3; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}91 //RotationAnimation { id: snowflake3_anim; running: false; targets: snowflake3; properties: "rotation"; from: 0; to: 360; duration: 30000; loops: Animation.Infinite}
92 }92 }
93 Image {93 Image {
94 id: cloud194 id: cloud1
@@ -262,13 +262,14 @@
262 targets: sun262 targets: sun
263 properties: "rotation"263 properties: "rotation"
264 from: 0264 from: 0
265 to: 360265 to: 10
266 loops: Animation.Infinite266 //loops: Animation.Infinite
267 duration: 60000267 duration:1000
268 }268 }
269 ParallelAnimation{269 ParallelAnimation{
270 id: anim_02270 id: anim_02
271 running: false271 running: false
272 paused: (running && !weatherCondition.visible)
272 SequentialAnimation {273 SequentialAnimation {
273 loops: Animation.Infinite274 loops: Animation.Infinite
274 ParallelAnimation{275 ParallelAnimation{
@@ -284,6 +285,7 @@
284 }285 }
285 SequentialAnimation {286 SequentialAnimation {
286 loops: Animation.Infinite287 loops: Animation.Infinite
288 paused: (running && !weatherCondition.visible)
287 PauseAnimation {duration: 17000}289 PauseAnimation {duration: 17000}
288 ParallelAnimation{290 ParallelAnimation{
289 SequentialAnimation {291 SequentialAnimation {
@@ -300,7 +302,7 @@
300 id: anim_11302 id: anim_11
301 running: false303 running: false
302 loops: Animation.Infinite304 loops: Animation.Infinite
303305 paused: (running && !weatherCondition.visible)
304 SequentialAnimation{306 SequentialAnimation{
305 PauseAnimation { duration: 2000 }307 PauseAnimation { duration: 2000 }
306 NumberAnimation {targets: cloud1Glow; properties: "opacity"; from: 0; to: 1; duration: 10}308 NumberAnimation {targets: cloud1Glow; properties: "opacity"; from: 0; to: 1; duration: 10}
@@ -328,40 +330,42 @@
328 ParallelAnimation {330 ParallelAnimation {
329 id: anim_13331 id: anim_13
330 running: false332 running: false
331 SequentialAnimation {333 paused: (running && !weatherCondition.visible)
332 loops: Animation.Infinite334 SequentialAnimation {
335 //loops: Animation.Infinite
336
337 //PauseAnimation { duration: 1000 }
338 ParallelAnimation{
339 NumberAnimation {target: snowflake1; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height*0.83; duration: 2000}
340 NumberAnimation {target: snowflake1; properties: "anchors.leftMargin"; from:weatherCondition.width/6; to:weatherCondition.height/15; duration: 2000}
341 NumberAnimation {target: snowflake1; easing.type: Easing.InQuint; properties: "opacity"; from: 0; to: 1; duration: 2000}
342 }
343 }
344 SequentialAnimation {
345 //loops: Animation.Infinite
333346
334 PauseAnimation { duration: 1000 }347 PauseAnimation { duration: 1000 }
335 ParallelAnimation{348 ParallelAnimation {
336 NumberAnimation {target: snowflake1; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}349 NumberAnimation {target: snowflake2; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height*0.8; duration: 2000}
337 NumberAnimation {target: snowflake1; properties: "anchors.leftMargin"; from:weatherCondition.width/6; to:weatherCondition.height/15; duration: 4000}350 NumberAnimation {target: snowflake2; properties: "anchors.leftMargin"; from:weatherCondition.width/2; to:weatherCondition.width/2.5; duration: 2000}
338 NumberAnimation {target: snowflake1; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}351 NumberAnimation {target: snowflake2; easing.type: Easing.InQuint; properties: "opacity"; from: 0; to: 1; duration: 2000}
339 }352 }
340 }353 }
341 SequentialAnimation {354 SequentialAnimation {
342 loops: Animation.Infinite355 //loops: Animation.Infinite
343356
344 PauseAnimation { duration: 3000 }357 PauseAnimation { duration: 500 }
345 ParallelAnimation {358 ParallelAnimation {
346 NumberAnimation {target: snowflake2; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}359 NumberAnimation {target: snowflake3; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height*0.86; duration: 2000}
347 NumberAnimation {target: snowflake2; properties: "anchors.leftMargin"; from:weatherCondition.width/2; to:weatherCondition.width/2.5; duration: 4000}360 NumberAnimation {target: snowflake3; properties: "anchors.leftMargin"; from:weatherCondition.width/1.2; to:weatherCondition.width/1.4; duration: 2000}
348 NumberAnimation {target: snowflake2; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}361 NumberAnimation {target: snowflake3; easing.type: Easing.InQuint; properties: "opacity"; from: 0; to: 1; duration: 2000}
349 }
350 }
351 SequentialAnimation {
352 loops: Animation.Infinite
353
354 PauseAnimation { duration: 2000 }
355 ParallelAnimation {
356 NumberAnimation {target: snowflake3; properties: "anchors.topMargin"; from:weatherCondition.height/1.5; to:weatherCondition.height; duration: 4000}
357 NumberAnimation {target: snowflake3; properties: "anchors.leftMargin"; from:weatherCondition.width/1.2; to:weatherCondition.width/1.4; duration: 4000}
358 NumberAnimation {target: snowflake3; easing.type: Easing.InQuint; properties: "opacity"; from: 1; to: 0; duration: 4000}
359 }362 }
360 }363 }
361 }364 }
362 ParallelAnimation{365 ParallelAnimation{
363 id: anim_50366 id: anim_50
364 running: false367 running: false
368 paused: (running && !weatherCondition.visible)
365 SequentialAnimation {369 SequentialAnimation {
366 loops: Animation.Infinite370 loops: Animation.Infinite
367 ParallelAnimation{371 ParallelAnimation{
@@ -391,26 +395,31 @@
391 // CONDITION TRANSITION ANIMATIONS395 // CONDITION TRANSITION ANIMATIONS
392 ParallelAnimation {396 ParallelAnimation {
393 id: anim_sunIn397 id: anim_sunIn
398 paused: (running && !weatherCondition.visible)
394 NumberAnimation { targets: sun; properties: "opacity"; to: 1; duration: 1000 }399 NumberAnimation { targets: sun; properties: "opacity"; to: 1; duration: 1000 }
395 ScriptAction {script:{sun.anchors.horizontalCenterOffset=0;sun.anchors.topMargin=0;__sun = true;anim_01.start();}}400 ScriptAction {script:{sun.anchors.horizontalCenterOffset=0;sun.anchors.topMargin=0;__sun = true;anim_01.start();}}
396 }401 }
397 ParallelAnimation {402 ParallelAnimation {
398 id: anim_moonIn403 id: anim_moonIn
404 paused: (running && !weatherCondition.visible)
399 NumberAnimation { targets: moon; properties: "opacity"; to: 1; duration: 1000 }405 NumberAnimation { targets: moon; properties: "opacity"; to: 1; duration: 1000 }
400 ScriptAction {script:{moon.anchors.horizontalCenterOffset=0;moon.anchors.topMargin=0;__moon = true;}}406 ScriptAction {script:{moon.anchors.horizontalCenterOffset=0;moon.anchors.topMargin=0;__moon = true;}}
401 }407 }
402 ParallelAnimation {408 ParallelAnimation {
403 id: anim_sunOut409 id: anim_sunOut
410 paused: (running && !weatherCondition.visible)
404 NumberAnimation { targets: sun; properties: "opacity"; to: 0; duration: 1000 }411 NumberAnimation { targets: sun; properties: "opacity"; to: 0; duration: 1000 }
405 ScriptAction {script:{__sun = false;anim_01.stop();}}412 ScriptAction {script:{__sun = false;anim_01.stop();}}
406 }413 }
407 ParallelAnimation {414 ParallelAnimation {
408 id: anim_moonOut415 id: anim_moonOut
416 paused: (running && !weatherCondition.visible)
409 NumberAnimation { targets: moon; properties: "opacity"; to: 0; duration: 1000 }417 NumberAnimation { targets: moon; properties: "opacity"; to: 0; duration: 1000 }
410 ScriptAction {script:__moon = false;}418 ScriptAction {script:__moon = false;}
411 }419 }
412 SequentialAnimation {420 SequentialAnimation {
413 id: anim_moon2sun421 id: anim_moon2sun
422 paused: (running && !weatherCondition.visible)
414 ParallelAnimation {423 ParallelAnimation {
415 NumberAnimation { targets: moon; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }424 NumberAnimation { targets: moon; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }
416 NumberAnimation { easing.type: Easing.InQuad; targets: moon; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }425 NumberAnimation { easing.type: Easing.InQuad; targets: moon; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }
@@ -425,6 +434,7 @@
425 }434 }
426 SequentialAnimation {435 SequentialAnimation {
427 id: anim_sun2moon436 id: anim_sun2moon
437 paused: (running && !weatherCondition.visible)
428 ParallelAnimation {438 ParallelAnimation {
429 NumberAnimation { targets: sun; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }439 NumberAnimation { targets: sun; properties: "anchors.horizontalCenterOffset"; from: units.gu(0); to: weatherCondition.width/1.5; duration: 1000 }
430 NumberAnimation { easing.type: Easing.InQuad; targets: sun; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }440 NumberAnimation { easing.type: Easing.InQuad; targets: sun; properties: "anchors.topMargin"; from: units.gu(0); to: weatherCondition.height/2.5; duration: 1000 }
@@ -439,6 +449,7 @@
439 }449 }
440 ParallelAnimation {450 ParallelAnimation {
441 id: anim_fewCloudsIn451 id: anim_fewCloudsIn
452 paused: (running && !weatherCondition.visible)
442 SequentialAnimation{453 SequentialAnimation{
443 PauseAnimation {duration: 1000}454 PauseAnimation {duration: 1000}
444 ScriptAction {script:{455 ScriptAction {script:{
@@ -449,6 +460,7 @@
449 }460 }
450 ParallelAnimation {461 ParallelAnimation {
451 id: anim_fewCloudsOut462 id: anim_fewCloudsOut
463 paused: (running && !weatherCondition.visible)
452 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000}464 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000}
453 NumberAnimation { targets: cloud2; properties: "opacity"; to: 0; duration: 1000}465 NumberAnimation { targets: cloud2; properties: "opacity"; to: 0; duration: 1000}
454 SequentialAnimation{466 SequentialAnimation{
@@ -461,6 +473,7 @@
461 }473 }
462 ParallelAnimation {474 ParallelAnimation {
463 id: anim_scatCloudsIn475 id: anim_scatCloudsIn
476 paused: (running && !weatherCondition.visible)
464 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }477 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }
465 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }478 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }
466 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }479 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }
@@ -471,6 +484,7 @@
471 }484 }
472 ParallelAnimation {485 ParallelAnimation {
473 id: anim_scatCloudsOut486 id: anim_scatCloudsOut
487 paused: (running && !weatherCondition.visible)
474 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }488 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }
475 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }489 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }
476 NumberAnimation { targets: cloud2; properties: "anchors.leftMargin"; from: weatherCondition.width/-15; to: weatherCondition.width/-1.5; duration: 1000 }490 NumberAnimation { targets: cloud2; properties: "anchors.leftMargin"; from: weatherCondition.width/-15; to: weatherCondition.width/-1.5; duration: 1000 }
@@ -479,6 +493,7 @@
479 }493 }
480 ParallelAnimation {494 ParallelAnimation {
481 id: anim_brokenCloudsIn495 id: anim_brokenCloudsIn
496 paused: (running && !weatherCondition.visible)
482 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }497 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; to: weatherCondition.width/6; duration: 1000 }
483 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }498 NumberAnimation { target: cloud1; property: "anchors.topMargin"; to: weatherCondition.height/-15; duration: 1000 }
484 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }499 NumberAnimation { targets: cloud1; properties: "opacity"; to: 1; duration: 1000 }
@@ -489,6 +504,7 @@
489 }504 }
490 ParallelAnimation {505 ParallelAnimation {
491 id: anim_brokenCloudsOut506 id: anim_brokenCloudsOut
507 paused: (running && !weatherCondition.visible)
492 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }508 NumberAnimation { targets: cloud1; properties: "anchors.leftMargin"; from: weatherCondition.width/6; to: weatherCondition.width/1.5; duration: 1000 }
493 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }509 NumberAnimation { targets: cloud1; properties: "opacity"; to: 0; duration: 1000 }
494 NumberAnimation { targets: cloud_dark1; properties: "anchors.leftMargin"; from: weatherCondition.height/-15; to: weatherCondition.width/-1.5; duration: 1000 }510 NumberAnimation { targets: cloud_dark1; properties: "anchors.leftMargin"; from: weatherCondition.height/-15; to: weatherCondition.width/-1.5; duration: 1000 }
@@ -497,22 +513,26 @@
497 }513 }
498 ParallelAnimation {514 ParallelAnimation {
499 id: anim_rainIn515 id: anim_rainIn
516 paused: (running && !weatherCondition.visible)
500 NumberAnimation { targets: rain1; properties: "opacity"; to: 1; duration: 1000 }517 NumberAnimation { targets: rain1; properties: "opacity"; to: 1; duration: 1000 }
501 NumberAnimation { targets: rain2; properties: "opacity"; to: 1; duration: 1000 }518 NumberAnimation { targets: rain2; properties: "opacity"; to: 1; duration: 1000 }
502 ScriptAction {script:__rain = true;}519 ScriptAction {script:__rain = true;}
503 }520 }
504 ParallelAnimation {521 ParallelAnimation {
505 id: anim_rainOut522 id: anim_rainOut
523 paused: (running && !weatherCondition.visible)
506 NumberAnimation { targets: rain1; properties: "opacity"; to: 0; duration: 1000 }524 NumberAnimation { targets: rain1; properties: "opacity"; to: 0; duration: 1000 }
507 NumberAnimation { targets: rain2; properties: "opacity"; to: 0; duration: 1000 }525 NumberAnimation { targets: rain2; properties: "opacity"; to: 0; duration: 1000 }
508 ScriptAction {script:__rain = false;}526 ScriptAction {script:__rain = false;}
509 }527 }
510 ParallelAnimation {528 ParallelAnimation {
511 id: anim_stormIn529 id: anim_stormIn
530 paused: (running && !weatherCondition.visible)
512 ScriptAction {script:{__storm = true; anim_11.restart();}}531 ScriptAction {script:{__storm = true; anim_11.restart();}}
513 }532 }
514 ParallelAnimation {533 ParallelAnimation {
515 id: anim_stormOut534 id: anim_stormOut
535 paused: (running && !weatherCondition.visible)
516 NumberAnimation { targets: lightning; properties: "opacity"; to: 0; duration: 1 }536 NumberAnimation { targets: lightning; properties: "opacity"; to: 0; duration: 1 }
517 NumberAnimation { targets: lightningfx; properties: "opacity"; to: 0; duration: 1 }537 NumberAnimation { targets: lightningfx; properties: "opacity"; to: 0; duration: 1 }
518 NumberAnimation { targets: lightningGlow; properties: "opacity"; to: 0; duration: 1 }538 NumberAnimation { targets: lightningGlow; properties: "opacity"; to: 0; duration: 1 }
@@ -522,23 +542,26 @@
522 }542 }
523 ParallelAnimation {543 ParallelAnimation {
524 id: anim_snowIn544 id: anim_snowIn
525 ScriptAction {script:{__snow = true; snowflake1_anim.start(); snowflake2_anim.start(); snowflake3_anim.start(); anim_13.restart();}}545 paused: (running && !weatherCondition.visible)
546 ScriptAction {script:{__snow = true; /*snowflake1_anim.start(); snowflake2_anim.start(); snowflake3_anim.start();*/ anim_13.start();}}
526 }547 }
527 ParallelAnimation {548 ParallelAnimation {
528 id: anim_snowOut549 id: anim_snowOut
550 paused: (running && !weatherCondition.visible)
529 NumberAnimation {targets: snowflake1; properties: "opacity"; to:0; duration: 1000}551 NumberAnimation {targets: snowflake1; properties: "opacity"; to:0; duration: 1000}
530 NumberAnimation {targets: snowflake2; properties: "opacity"; to:0; duration: 1000}552 NumberAnimation {targets: snowflake2; properties: "opacity"; to:0; duration: 1000}
531 NumberAnimation {targets: snowflake3; properties: "opacity"; to:0; duration: 1000}553 NumberAnimation {targets: snowflake3; properties: "opacity"; to:0; duration: 1000}
532 ScriptAction {script:{__snow = false; snowflake1_anim.stop(); snowflake2_anim.stop(); snowflake3_anim.stop(); anim_13.stop();}}554 ScriptAction {script:{__snow = false; /*snowflake1_anim.stop(); snowflake2_anim.stop(); snowflake3_anim.stop();*/ /*anim_13.stop();*/}}
533 }555 }
534 SequentialAnimation {556 SequentialAnimation {
535 id: anim_fogIn557 id: anim_fogIn
536558 paused: (running && !weatherCondition.visible)
537 PauseAnimation {duration: 1000}559 PauseAnimation {duration: 1000}
538 ScriptAction {script:{anim_50.restart(); script:__fog = true;}}560 ScriptAction {script:{anim_50.restart(); script:__fog = true;}}
539 }561 }
540 ParallelAnimation {562 ParallelAnimation {
541 id: anim_fogOut563 id: anim_fogOut
564 paused: (running && !weatherCondition.visible)
542 NumberAnimation { targets: fogBlur1; properties: "opacity"; to: 0; duration: 1000}565 NumberAnimation { targets: fogBlur1; properties: "opacity"; to: 0; duration: 1000}
543 NumberAnimation { targets: fogBlur2; properties: "opacity"; to: 0; duration: 1000}566 NumberAnimation { targets: fogBlur2; properties: "opacity"; to: 0; duration: 1000}
544 SequentialAnimation{567 SequentialAnimation{

Subscribers

People subscribed via source and target branches