ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #01375
[Merge] lp:~nik90/ubuntu-weather-app/minor-headerrow-tweak into lp:ubuntu-weather-app/reboot
Nekhelesh Ramananthan has proposed merging lp:~nik90/ubuntu-weather-app/minor-headerrow-tweak into lp:ubuntu-weather-app/reboot.
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
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~nik90/ubuntu-weather-app/minor-headerrow-tweak/+merge/255407
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
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~nik90/ubuntu-weather-app/minor-headerrow-tweak into lp:ubuntu-weather-app/reboot.
=== modified file 'app/components/HeaderRow.qml'
--- app/components/HeaderRow.qml 2015-02-09 19:49:06 +0000
+++ app/components/HeaderRow.qml 2015-04-07 19:02:24 +0000
@@ -17,23 +17,24 @@
*/
import QtQuick 2.3
+import QtQuick.Layouts 1.1
import Ubuntu.Components 1.1
-
-Row {
- spacing: units.gu(2)
+RowLayout {
+ id: headerRow
+
+ property alias locationName: locationNameLabel.text
+
width: parent.width
- property alias locationName: locationNameLabel.text
-
Label {
id: locationNameLabel
color: UbuntuColors.darkGrey
elide: Text.ElideRight
font.weight: Font.Normal
fontSize: "large"
+ Layout.fillWidth: true
height: settingsButton.height
- width: parent.width - settingsButton.width - parent.spacing
verticalAlignment: Text.AlignVCenter
}
@@ -45,21 +46,17 @@
onClicked: mainPageStack.push(Qt.resolvedUrl("../ui/SettingsPage.qml"))
Rectangle {
- anchors {
- fill: parent
- }
+ anchors.fill: parent
+ visible: parent.pressed
color: Theme.palette.selected.background
- visible: parent.pressed
}
Icon {
- anchors {
- centerIn: parent
- }
- color: UbuntuColors.darkGrey
name: "settings"
height: width
width: units.gu(2.5)
+ anchors.centerIn: parent
+ color: UbuntuColors.darkGrey
}
}
}
=== modified file 'app/ui/LocationPane.qml'
--- app/ui/LocationPane.qml 2015-04-04 12:01:21 +0000
+++ app/ui/LocationPane.qml 2015-04-07 19:02:24 +0000
@@ -113,7 +113,9 @@
Column {
id: locationTop
+
anchors {
+ top: parent.top
left: parent.left
right: parent.right
margins: units.gu(2)
=== modified file 'app/ui/LocationsPage.qml'
--- app/ui/LocationsPage.qml 2015-03-21 17:08:40 +0000
+++ app/ui/LocationsPage.qml 2015-04-07 19:02:24 +0000
@@ -82,16 +82,13 @@
Item {
anchors {
- bottom: parent.bottom
- left: parent.left
+ fill: parent
leftMargin: units.gu(2)
- right: parent.right
rightMargin: units.gu(2)
- top: parent.top
}
Label {
- id: nameLabel
+ id: locationName
anchors {
left: parent.left
right: weatherImage.visible ? weatherImage.left : parent.right
@@ -104,18 +101,15 @@
Icon {
id: weatherImage
- anchors {
- horizontalCenter: parent.horizontalCenter
- verticalCenter: parent.verticalCenter
- }
- height: units.gu(3)
name: icon
- visible: locationsPage.state === "default"
width: units.gu(3)
+ height: units.gu(3)
+ anchors.centerIn: parent
+ visible: locationsPage.state === "default"
}
Label {
- id: nowLabel
+ id: temperatureLabel
anchors {
left: weatherImage.right
leftMargin: units.gu(1)
@@ -126,13 +120,10 @@
elide: Text.ElideRight
font.pixelSize: units.gu(4)
font.weight: Font.Light
- horizontalAlignment: Text.AlignRight
- text: temp + ""+ settings.tempScale
+ horizontalAlignment: Text.AlignRight
+ text: temp + settings.tempScale
visible: locationsPage.state === "default"
}
- Component.onCompleted: {
-
- }
}
ListItem.ThinDivider {
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-04-04 07:59:32 +0000
+++ po/com.ubuntu.weather.pot 2015-04-07 19:02:24 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: ubuntu-weather-app\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-04-04 09:58+0200\n"
+"POT-Creation-Date: 2015-04-07 20:58+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
References