Merge lp:~neokore/ubuntu-weather-app/ReturnToMainInfoAfterScroll into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Raúl Yeguas
Status: Merged
Approved by: Martin Borho
Approved revision: 119
Merged at revision: 118
Proposed branch: lp:~neokore/ubuntu-weather-app/ReturnToMainInfoAfterScroll
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 66 lines (+28/-11)
1 file modified
components/CurrentWeather.qml (+28/-11)
To merge this branch: bzr merge lp:~neokore/ubuntu-weather-app/ReturnToMainInfoAfterScroll
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+186398@code.launchpad.net

Commit message

Returns the last element to primary information screen and skip animation.

Description of the change

Fixes bug 1227150. Forecast should always return to primary information screen.

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
Martin Borho (martin-borho) wrote :

Looks good, well done!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components/CurrentWeather.qml'
2--- components/CurrentWeather.qml 2013-09-17 18:17:44 +0000
3+++ components/CurrentWeather.qml 2013-09-18 17:31:18 +0000
4@@ -61,6 +61,7 @@
5 dailyForecastList.decrementCurrentIndex();
6 }
7 dailyForecastList.positionViewAtIndex(dailyForecastList.currentIndex,ListView.SnapPosition);
8+ flipable.flipped = false;
9 }
10 }
11 }
12@@ -269,7 +270,6 @@
13 transitions:[
14 Transition {
15 to:"back"
16- reversible: true
17 SequentialAnimation{
18 ParallelAnimation {
19 NumberAnimation { target: currentCondition; property: "anchors.verticalCenterOffset"; duration: UbuntuAnimation.SlowDuration; to: units.gu(8); easing: UbuntuAnimation.StandardEasing }
20@@ -286,20 +286,37 @@
21 Transition {
22 from: "back"
23 to:"front"
24- SequentialAnimation{
25- ParallelAnimation {
26- NumberAnimation {target: frontrect; property: "opacity"; to:1; duration: UbuntuAnimation.SlowDuration}
27- NumberAnimation {target: backrect; property: "opacity"; to:0; duration: UbuntuAnimation.SlowDuration}
28- }
29- ParallelAnimation{
30- NumberAnimation {target: currentConditionIcon; property: "opacity"; to:1; duration: UbuntuAnimation.SlowDuration}
31- NumberAnimation {target: currentConditionTempContent; property: "opacity"; to:1; duration: UbuntuAnimation.SlowDuration}
32- NumberAnimation { target: currentCondition; property: "anchors.verticalCenterOffset"; duration: UbuntuAnimation.SlowDuration; to: 0; easing: UbuntuAnimation.StandardEasingReverse }
33- NumberAnimation { target: currentConditionTemp; property: "anchors.verticalCenterOffset"; duration: UbuntuAnimation.SlowDuration; to: 0; easing: UbuntuAnimation.StandardEasingReverse }
34+ ScriptAction{
35+ script: {
36+ if(dailyForecastList.currentItem == dailyForecastItem){
37+ back2frontAnim.start();
38+ }else{
39+ backrect.opacity = 0;
40+ frontrect.opacity = 1;
41+ currentConditionIcon.opacity = 1;
42+ currentConditionTempContent.opacity = 1;
43+ currentCondition.anchors.verticalCenterOffset = 0;
44+ currentConditionTemp.anchors.verticalCenterOffset = 0;
45+ }
46 }
47 }
48 }
49 ]
50+
51+ SequentialAnimation{
52+ id: back2frontAnim
53+ running: false
54+ ParallelAnimation {
55+ NumberAnimation {target: frontrect; property: "opacity"; to:1; duration: UbuntuAnimation.SlowDuration}
56+ NumberAnimation {target: backrect; property: "opacity"; to:0; duration: UbuntuAnimation.SlowDuration}
57+ }
58+ ParallelAnimation{
59+ NumberAnimation {target: currentConditionIcon; property: "opacity"; to:1; duration: UbuntuAnimation.SlowDuration}
60+ NumberAnimation {target: currentConditionTempContent; property: "opacity"; to:1; duration: UbuntuAnimation.SlowDuration}
61+ NumberAnimation { target: currentCondition; property: "anchors.verticalCenterOffset"; duration: UbuntuAnimation.SlowDuration; to: 0; easing: UbuntuAnimation.StandardEasingReverse }
62+ NumberAnimation { target: currentConditionTemp; property: "anchors.verticalCenterOffset"; duration: UbuntuAnimation.SlowDuration; to: 0; easing: UbuntuAnimation.StandardEasingReverse }
63+ }
64+ }
65 }
66 }
67

Subscribers

People subscribed via source and target branches