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
=== modified file 'app/components/HeaderRow.qml'
--- app/components/HeaderRow.qml 2015-02-09 19:49:06 +0000
+++ app/components/HeaderRow.qml 2015-04-11 00:28:08 +0000
@@ -17,15 +17,16 @@
17 */17 */
1818
19import QtQuick 2.319import QtQuick 2.3
20import QtQuick.Layouts 1.1
20import Ubuntu.Components 1.121import Ubuntu.Components 1.1
2122
2223RowLayout {
23Row {24 id: headerRow
24 spacing: units.gu(2)25
26 property alias locationName: locationNameLabel.text
27
25 width: parent.width28 width: parent.width
2629
27 property alias locationName: locationNameLabel.text
28
29 Label {30 Label {
30 id: locationNameLabel31 id: locationNameLabel
31 color: UbuntuColors.darkGrey32 color: UbuntuColors.darkGrey
@@ -33,7 +34,7 @@
33 font.weight: Font.Normal34 font.weight: Font.Normal
34 fontSize: "large"35 fontSize: "large"
35 height: settingsButton.height36 height: settingsButton.height
36 width: parent.width - settingsButton.width - parent.spacing37 Layout.fillWidth: true
37 verticalAlignment: Text.AlignVCenter38 verticalAlignment: Text.AlignVCenter
38 }39 }
3940
@@ -45,20 +46,16 @@
45 onClicked: mainPageStack.push(Qt.resolvedUrl("../ui/SettingsPage.qml"))46 onClicked: mainPageStack.push(Qt.resolvedUrl("../ui/SettingsPage.qml"))
4647
47 Rectangle {48 Rectangle {
48 anchors {49 anchors.fill: parent
49 fill: parent
50 }
51 color: Theme.palette.selected.background50 color: Theme.palette.selected.background
52 visible: parent.pressed51 visible: parent.pressed
53 }52 }
5453
55 Icon {54 Icon {
56 anchors {55 anchors.centerIn: parent
57 centerIn: parent
58 }
59 color: UbuntuColors.darkGrey56 color: UbuntuColors.darkGrey
57 height: width
60 name: "settings"58 name: "settings"
61 height: width
62 width: units.gu(2.5)59 width: units.gu(2.5)
63 }60 }
64 }61 }
6562
=== modified file 'app/ui/LocationPane.qml'
--- app/ui/LocationPane.qml 2015-04-04 12:01:21 +0000
+++ app/ui/LocationPane.qml 2015-04-11 00:28:08 +0000
@@ -113,7 +113,9 @@
113113
114 Column {114 Column {
115 id: locationTop115 id: locationTop
116
116 anchors {117 anchors {
118 top: parent.top
117 left: parent.left119 left: parent.left
118 right: parent.right120 right: parent.right
119 margins: units.gu(2)121 margins: units.gu(2)
120122
=== modified file 'app/ui/LocationsPage.qml'
--- app/ui/LocationsPage.qml 2015-03-21 17:08:40 +0000
+++ app/ui/LocationsPage.qml 2015-04-11 00:28:08 +0000
@@ -82,16 +82,13 @@
8282
83 Item {83 Item {
84 anchors {84 anchors {
85 bottom: parent.bottom85 fill: parent
86 left: parent.left
87 leftMargin: units.gu(2)86 leftMargin: units.gu(2)
88 right: parent.right
89 rightMargin: units.gu(2)87 rightMargin: units.gu(2)
90 top: parent.top
91 }88 }
9289
93 Label {90 Label {
94 id: nameLabel91 id: locationName
95 anchors {92 anchors {
96 left: parent.left93 left: parent.left
97 right: weatherImage.visible ? weatherImage.left : parent.right94 right: weatherImage.visible ? weatherImage.left : parent.right
@@ -104,18 +101,15 @@
104101
105 Icon {102 Icon {
106 id: weatherImage103 id: weatherImage
107 anchors {104 anchors.centerIn: parent
108 horizontalCenter: parent.horizontalCenter105 name: icon
109 verticalCenter: parent.verticalCenter
110 }
111 height: units.gu(3)106 height: units.gu(3)
112 name: icon
113 visible: locationsPage.state === "default"
114 width: units.gu(3)107 width: units.gu(3)
108 visible: locationsPage.state === "default"
115 }109 }
116110
117 Label {111 Label {
118 id: nowLabel112 id: temperatureLabel
119 anchors {113 anchors {
120 left: weatherImage.right114 left: weatherImage.right
121 leftMargin: units.gu(1)115 leftMargin: units.gu(1)
@@ -126,13 +120,10 @@
126 elide: Text.ElideRight120 elide: Text.ElideRight
127 font.pixelSize: units.gu(4)121 font.pixelSize: units.gu(4)
128 font.weight: Font.Light122 font.weight: Font.Light
129 horizontalAlignment: Text.AlignRight 123 horizontalAlignment: Text.AlignRight
130 text: temp + ""+ settings.tempScale124 text: temp + settings.tempScale
131 visible: locationsPage.state === "default"125 visible: locationsPage.state === "default"
132 }126 }
133 Component.onCompleted: {
134
135 }
136 }127 }
137128
138 ListItem.ThinDivider {129 ListItem.ThinDivider {
139130
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-04-09 22:28:40 +0000
+++ po/com.ubuntu.weather.pot 2015-04-11 00:28:08 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: ubuntu-weather-app\n"9"Project-Id-Version: ubuntu-weather-app\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2015-04-07 21:22+0200\n"11"POT-Creation-Date: 2015-04-11 02:27+0200\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"

Subscribers

People subscribed via source and target branches