Merge lp:~nik90/ubuntu-weather-app/minor-headerrow-tweak into lp:ubuntu-weather-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Victor Thompson
Approved revision: 37
Merged at revision: 33
Proposed branch: lp:~nik90/ubuntu-weather-app/minor-headerrow-tweak
Merge into: lp:ubuntu-weather-app
Diff against target: 147 lines (+21/-31)
4 files modified
app/components/HeaderRow.qml (+10/-13)
app/ui/LocationPane.qml (+2/-0)
app/ui/LocationsPage.qml (+8/-17)
po/com.ubuntu.weather.pot (+1/-1)
To merge this branch: bzr merge lp:~nik90/ubuntu-weather-app/minor-headerrow-tweak
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+255407@code.launchpad.net

Commit message

- Adjusted the top margin spacing of the location name shown in the home page to 2 grid units as shown in the design spec [1].

- Improved HeaderRow.qml by using RowLayout which allows us to remove calculations like width: parent.width - spacing - icon.width and so on.

- Minor code clean up of LocationsPage.qml

[1] https://docs.google.com/presentation/d/1tXcyMBvJAYvwFvUAmTTYzmBP2NFQgbG_Gy8e2gv91kU/edit#slide=id.g3c301e3c2_05

Description of the change

Just a minor MP which does the following,
- Adjusted the top margin spacing of the location name shown in the home page to 2 grid units as shown in the design spec [1].

- Improved HeaderRow.qml by using RowLayout which allows us to remove calculations like width: parent.width - spacing - icon.width and so on.

- Minor code clean up of LocationsPage.qml

[1] https://docs.google.com/presentation/d/1tXcyMBvJAYvwFvUAmTTYzmBP2NFQgbG_Gy8e2gv91kU/edit#slide=id.g3c301e3c2_05

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
Victor Thompson (vthompson) wrote :

lgtm, however, I think some of the instances where properties are being reordered seem odd--as I'm used to either mostly strict alphabetical ordering (Andrew is quite adamant about this) or some mix of logical grouping and alphabetization (height and width grouped, but height is always first).

review: Approve
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> lgtm, however, I think some of the instances where properties are being
> reordered seem odd--as I'm used to either mostly strict alphabetical ordering
> (Andrew is quite adamant about this) or some mix of logical grouping and
> alphabetization (height and width grouped, but height is always first).

Ah I wasn't aware of that. I fixed the order.

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Merge conflict \o/

Text conflict in po/com.ubuntu.weather.pot
1 conflicts encountered.
bzr: ERROR: Conflicts from merge

Revision history for this message
Victor Thompson (vthompson) wrote :

It'd be nice if we found a way to have CMake not update the *.pot file if no strings are changing. Having it update the date when nothing has changed is unnecessary.

37. By Nekhelesh Ramananthan

Merged lp:ubuntu-weather-app/reboot and fixed code conflict

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Code conflict resolved :-)

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
Nekhelesh Ramananthan (nik90) wrote :

Damn Jenkins runs really fast on weather reboot. Takes ages in the clock app.

Revision history for this message
Victor Thompson (vthompson) wrote :

I've noticed the same in comparison to music. Having no tests will do that. ;)

Approved!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/HeaderRow.qml'
2--- app/components/HeaderRow.qml 2015-02-09 19:49:06 +0000
3+++ app/components/HeaderRow.qml 2015-04-11 00:28:08 +0000
4@@ -17,15 +17,16 @@
5 */
6
7 import QtQuick 2.3
8+import QtQuick.Layouts 1.1
9 import Ubuntu.Components 1.1
10
11-
12-Row {
13- spacing: units.gu(2)
14+RowLayout {
15+ id: headerRow
16+
17+ property alias locationName: locationNameLabel.text
18+
19 width: parent.width
20
21- property alias locationName: locationNameLabel.text
22-
23 Label {
24 id: locationNameLabel
25 color: UbuntuColors.darkGrey
26@@ -33,7 +34,7 @@
27 font.weight: Font.Normal
28 fontSize: "large"
29 height: settingsButton.height
30- width: parent.width - settingsButton.width - parent.spacing
31+ Layout.fillWidth: true
32 verticalAlignment: Text.AlignVCenter
33 }
34
35@@ -45,20 +46,16 @@
36 onClicked: mainPageStack.push(Qt.resolvedUrl("../ui/SettingsPage.qml"))
37
38 Rectangle {
39- anchors {
40- fill: parent
41- }
42+ anchors.fill: parent
43 color: Theme.palette.selected.background
44 visible: parent.pressed
45 }
46
47 Icon {
48- anchors {
49- centerIn: parent
50- }
51+ anchors.centerIn: parent
52 color: UbuntuColors.darkGrey
53+ height: width
54 name: "settings"
55- height: width
56 width: units.gu(2.5)
57 }
58 }
59
60=== modified file 'app/ui/LocationPane.qml'
61--- app/ui/LocationPane.qml 2015-04-04 12:01:21 +0000
62+++ app/ui/LocationPane.qml 2015-04-11 00:28:08 +0000
63@@ -113,7 +113,9 @@
64
65 Column {
66 id: locationTop
67+
68 anchors {
69+ top: parent.top
70 left: parent.left
71 right: parent.right
72 margins: units.gu(2)
73
74=== modified file 'app/ui/LocationsPage.qml'
75--- app/ui/LocationsPage.qml 2015-03-21 17:08:40 +0000
76+++ app/ui/LocationsPage.qml 2015-04-11 00:28:08 +0000
77@@ -82,16 +82,13 @@
78
79 Item {
80 anchors {
81- bottom: parent.bottom
82- left: parent.left
83+ fill: parent
84 leftMargin: units.gu(2)
85- right: parent.right
86 rightMargin: units.gu(2)
87- top: parent.top
88 }
89
90 Label {
91- id: nameLabel
92+ id: locationName
93 anchors {
94 left: parent.left
95 right: weatherImage.visible ? weatherImage.left : parent.right
96@@ -104,18 +101,15 @@
97
98 Icon {
99 id: weatherImage
100- anchors {
101- horizontalCenter: parent.horizontalCenter
102- verticalCenter: parent.verticalCenter
103- }
104+ anchors.centerIn: parent
105+ name: icon
106 height: units.gu(3)
107- name: icon
108- visible: locationsPage.state === "default"
109 width: units.gu(3)
110+ visible: locationsPage.state === "default"
111 }
112
113 Label {
114- id: nowLabel
115+ id: temperatureLabel
116 anchors {
117 left: weatherImage.right
118 leftMargin: units.gu(1)
119@@ -126,13 +120,10 @@
120 elide: Text.ElideRight
121 font.pixelSize: units.gu(4)
122 font.weight: Font.Light
123- horizontalAlignment: Text.AlignRight
124- text: temp + ""+ settings.tempScale
125+ horizontalAlignment: Text.AlignRight
126+ text: temp + settings.tempScale
127 visible: locationsPage.state === "default"
128 }
129- Component.onCompleted: {
130-
131- }
132 }
133
134 ListItem.ThinDivider {
135
136=== modified file 'po/com.ubuntu.weather.pot'
137--- po/com.ubuntu.weather.pot 2015-04-09 22:28:40 +0000
138+++ po/com.ubuntu.weather.pot 2015-04-11 00:28:08 +0000
139@@ -8,7 +8,7 @@
140 msgstr ""
141 "Project-Id-Version: ubuntu-weather-app\n"
142 "Report-Msgid-Bugs-To: \n"
143-"POT-Creation-Date: 2015-04-07 21:22+0200\n"
144+"POT-Creation-Date: 2015-04-11 02:27+0200\n"
145 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
146 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
147 "Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches