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

Proposed by Raúl Yeguas
Status: Merged
Approved by: Martin Borho
Approved revision: 18
Merged at revision: 16
Proposed branch: lp:~neokore/ubuntu-weather-app/LoadingComponent
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 59 lines (+34/-1)
2 files modified
components/LoadingComponent.qml (+31/-0)
ubuntu-weather-app.qml (+3/-1)
To merge this branch: bzr merge lp:~neokore/ubuntu-weather-app/LoadingComponent
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+161869@code.launchpad.net

Commit message

Added a 'Loading Component' to show an animation while app is loading data. This component is included into default Tab in ubuntu-weather-app.qml.

Description of the change

Added a 'Loading Component' to show an animation while app is loading data.

To post a comment you must log in.
Revision history for this message
Martin Borho (martin-borho) wrote :

Looks great!

review: Approve
Revision history for this message
Martin Borho (martin-borho) wrote :

When all locations are removed, the circle should not be visible anymore.

review: Needs Fixing
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
18. By Raúl Yeguas

Fixed LoadingComponent not being destroyed after data is loaded.

Revision history for this message
Martin Borho (martin-borho) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'components/LoadingComponent.qml'
--- components/LoadingComponent.qml 1970-01-01 00:00:00 +0000
+++ components/LoadingComponent.qml 2013-05-01 16:39:24 +0000
@@ -0,0 +1,31 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4Rectangle {
5 Image {
6 id: image1
7 anchors.rightMargin: units.gu(10)
8 anchors.leftMargin: units.gu(10)
9 anchors.bottomMargin: units.gu(10)
10 anchors.topMargin: units.gu(10)
11 anchors.fill: parent
12 source: "../resources/images/ubuntu-logo.png"
13 fillMode: Image.PreserveAspectFit
14 }
15
16 RotationAnimation {
17 running: true
18 targets: image1
19 properties: "rotation"
20 from: 0
21 to: 360
22 loops: Animation.Infinite
23 duration: 5000
24 }
25
26 Text {
27 color: "#ffffff"
28 anchors.centerIn: parent
29 text: i18n.tr("Loading")
30 }
31}
032
=== added file 'resources/images/ubuntu-logo.png'
1Binary files resources/images/ubuntu-logo.png 1970-01-01 00:00:00 +0000 and resources/images/ubuntu-logo.png 2013-05-01 16:39:24 +0000 differ33Binary files resources/images/ubuntu-logo.png 1970-01-01 00:00:00 +0000 and resources/images/ubuntu-logo.png 2013-05-01 16:39:24 +0000 differ
=== modified file 'ubuntu-weather-app.qml'
--- ubuntu-weather-app.qml 2013-04-27 14:49:15 +0000
+++ ubuntu-weather-app.qml 2013-05-01 16:39:24 +0000
@@ -52,6 +52,8 @@
52 tabsString += "Components.LocationTabEmpty { }"52 tabsString += "Components.LocationTabEmpty { }"
53 }53 }
54 tabsString += "}"; // END Tabs componen54 tabsString += "}"; // END Tabs componen
55 if(loading != null)
56 loading.destroy();
55 tabsObject = Qt.createQmlObject(tabsString, tabPage, "tabs")57 tabsObject = Qt.createQmlObject(tabsString, tabPage, "tabs")
56 }58 }
5759
@@ -102,7 +104,7 @@
102 id: tabs104 id: tabs
103 objectName: "Tabs"105 objectName: "Tabs"
104 anchors.fill: parent106 anchors.fill: parent
105 Tab {}107 Tab {Components.LoadingComponent{id:loading; anchors.fill: parent}}
106 }108 }
107 }109 }
108}110}

Subscribers

People subscribed via source and target branches