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

Proposed by Andrew Hayzen on 2017-04-19
Status: Merged
Approved by: Andrew Hayzen on 2017-04-19
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 on 2017-04-19
Jenkins Bot continuous-integration Approve on 2017-04-19
Ubuntu Weather Developers 2017-04-19 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.
review: Approve (continuous-integration)
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
1=== modified file 'app/components/LoadingIndicator.qml'
2--- app/components/LoadingIndicator.qml 2015-11-02 21:28:34 +0000
3+++ app/components/LoadingIndicator.qml 2017-04-19 10:56:54 +0000
4@@ -22,18 +22,12 @@
5 Rectangle {
6 id: indicator
7 objectName: "processingIndicator"
8- anchors {
9- left: parent.left
10- right: parent.right
11- bottom: parent.bottom
12- bottomMargin: Qt.inputMethod.keyboardRectangle.height
13- }
14 height: units.dp(3)
15 color: "white"
16 opacity: 0
17 visible: opacity > 0
18
19- readonly property bool processing: loading
20+ property bool processing: false
21
22 Behavior on opacity {
23 UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration }
24
25=== modified file 'app/ubuntu-weather-app.qml'
26--- app/ubuntu-weather-app.qml 2016-10-08 08:44:17 +0000
27+++ app/ubuntu-weather-app.qml 2017-04-19 10:56:54 +0000
28@@ -128,6 +128,13 @@
29 function fillPages(locations) {
30 locationsList = []
31 locationsList = locations;
32+
33+ // Loading is complete
34+ // Either directly from cached entries being passed here
35+ // - storage.getLocations(fillPages);
36+ // or after updateData has occurred
37+ // - fillPages(messageObject.result) from responseDataHandler
38+ loading = false;
39 }
40
41 /*
42
43=== modified file 'app/ui/HomePage.qml'
44--- app/ui/HomePage.qml 2017-04-12 15:48:27 +0000
45+++ app/ui/HomePage.qml 2017-04-19 10:56:54 +0000
46@@ -35,10 +35,19 @@
47 height: parent.height
48 preloadContent: true
49 hint {
50+ // Force using mouse style bottom edge hint (works well in touch)
51+ status: BottomEdgeHint.Locked
52 // Once pad.lv/1536669 is fixed, the status will be auto set to
53 // locked when a mouse is detected, in that case we'll show text
54 // otherwise we hide the text as this causes strange animations
55 text: bottomEdge.hint.status == BottomEdgeHint.Locked ? i18n.tr("Locations") : ""
56+
57+ // Force using mouse style bottom edge hint (works well in touch)
58+ onStatusChanged: {
59+ if (status == BottomEdgeHint.Inactive) {
60+ bottomEdge.hint.status = BottomEdgeHint.Locked;
61+ }
62+ }
63 }
64
65 Component {
66@@ -183,6 +192,13 @@
67
68 LoadingIndicator {
69 id: loadingIndicator
70+ anchors {
71+ bottom: parent.bottom
72+ bottomMargin: Qt.inputMethod.keyboardRectangle.height + bottomEdge.hint.height
73+ left: parent.left
74+ right: parent.right
75+ }
76+ processing: loading
77 }
78
79 Loader {

Subscribers

People subscribed via source and target branches

to all changes: