Merge lp:~ahayzen/ubuntu-weather-app/fix-1542767-bounce-never-stop into lp:ubuntu-weather-app

Proposed by Andrew Hayzen
Status: Merged
Approved by: Andrew Hayzen
Approved revision: 270
Merged at revision: 270
Proposed branch: lp:~ahayzen/ubuntu-weather-app/fix-1542767-bounce-never-stop
Merge into: lp:ubuntu-weather-app
Diff against target: 79 lines (+24/-7)
3 files modified
app/components/LoadingIndicator.qml (+1/-7)
app/ubuntu-weather-app.qml (+7/-0)
app/ui/HomePage.qml (+16/-0)
To merge this branch: bzr merge lp:~ahayzen/ubuntu-weather-app/fix-1542767-bounce-never-stop
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
Jenkins Bot continuous-integration Approve
Ubuntu Weather Developers Pending
Review via email: mp+322758@code.launchpad.net

Commit message

* Fix bounce bar not stopping when detect location is off and there are no locations
* Force bottom edge to use mouse style
* Fix bounce bar positioning so bottom edge doesn't cover it

Description of the change

* Fix bounce bar not stopping when detect location is off and there are no locations
* Force bottom edge to use mouse style
* Fix bounce bar positioning so bottom edge doesn't cover it

TESTING:
1) Remove all your locations
2) Turn off detect location
3) Notice that the bounce animation at the bottom is not shown (before it was)

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Looks good :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'app/components/LoadingIndicator.qml'
--- app/components/LoadingIndicator.qml 2015-11-02 21:28:34 +0000
+++ app/components/LoadingIndicator.qml 2017-04-19 10:56:54 +0000
@@ -22,18 +22,12 @@
22Rectangle {22Rectangle {
23 id: indicator23 id: indicator
24 objectName: "processingIndicator"24 objectName: "processingIndicator"
25 anchors {
26 left: parent.left
27 right: parent.right
28 bottom: parent.bottom
29 bottomMargin: Qt.inputMethod.keyboardRectangle.height
30 }
31 height: units.dp(3)25 height: units.dp(3)
32 color: "white"26 color: "white"
33 opacity: 027 opacity: 0
34 visible: opacity > 028 visible: opacity > 0
3529
36 readonly property bool processing: loading30 property bool processing: false
3731
38 Behavior on opacity {32 Behavior on opacity {
39 UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }33 UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
4034
=== modified file 'app/ubuntu-weather-app.qml'
--- app/ubuntu-weather-app.qml 2016-10-08 08:44:17 +0000
+++ app/ubuntu-weather-app.qml 2017-04-19 10:56:54 +0000
@@ -128,6 +128,13 @@
128 function fillPages(locations) {128 function fillPages(locations) {
129 locationsList = []129 locationsList = []
130 locationsList = locations;130 locationsList = locations;
131
132 // Loading is complete
133 // Either directly from cached entries being passed here
134 // - storage.getLocations(fillPages);
135 // or after updateData has occurred
136 // - fillPages(messageObject.result) from responseDataHandler
137 loading = false;
131 }138 }
132139
133 /*140 /*
134141
=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml 2017-04-12 15:48:27 +0000
+++ app/ui/HomePage.qml 2017-04-19 10:56:54 +0000
@@ -35,10 +35,19 @@
35 height: parent.height35 height: parent.height
36 preloadContent: true36 preloadContent: true
37 hint {37 hint {
38 // Force using mouse style bottom edge hint (works well in touch)
39 status: BottomEdgeHint.Locked
38 // Once pad.lv/1536669 is fixed, the status will be auto set to40 // Once pad.lv/1536669 is fixed, the status will be auto set to
39 // locked when a mouse is detected, in that case we'll show text41 // locked when a mouse is detected, in that case we'll show text
40 // otherwise we hide the text as this causes strange animations42 // otherwise we hide the text as this causes strange animations
41 text: bottomEdge.hint.status == BottomEdgeHint.Locked ? i18n.tr("Locations") : ""43 text: bottomEdge.hint.status == BottomEdgeHint.Locked ? i18n.tr("Locations") : ""
44
45 // Force using mouse style bottom edge hint (works well in touch)
46 onStatusChanged: {
47 if (status == BottomEdgeHint.Inactive) {
48 bottomEdge.hint.status = BottomEdgeHint.Locked;
49 }
50 }
42 }51 }
4352
44 Component {53 Component {
@@ -183,6 +192,13 @@
183192
184 LoadingIndicator {193 LoadingIndicator {
185 id: loadingIndicator194 id: loadingIndicator
195 anchors {
196 bottom: parent.bottom
197 bottomMargin: Qt.inputMethod.keyboardRectangle.height + bottomEdge.hint.height
198 left: parent.left
199 right: parent.right
200 }
201 processing: loading
186 }202 }
187203
188 Loader {204 Loader {

Subscribers

People subscribed via source and target branches

to all changes: