ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00679
[Merge] lp:~vthompson/ubuntu-weather-app/reboot-add-temp-to-locations into lp:ubuntu-weather-app/reboot
Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/reboot-add-temp-to-locations into lp:ubuntu-weather-app/reboot.
Commit message:
Add current temps to the Locations page.
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-add-temp-to-locations/+merge/252919
This change uses the data on the HomePages to place the current conditions on the LocationsPage.
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/reboot-add-temp-to-locations into lp:ubuntu-weather-app/reboot.
=== modified file 'app/ui/LocationsPage.qml'
--- app/ui/LocationsPage.qml 2015-03-06 14:15:29 +0000
+++ app/ui/LocationsPage.qml 2015-03-13 15:55:52 +0000
@@ -63,6 +63,7 @@
id: locationsModel
}
delegate: WeatherListItem {
+ id: locationsListItem
leftSideAction: Remove {
onTriggered: storage.removeLocation(index)
}
@@ -79,16 +80,46 @@
storage.moveLocation(from, to);
}
- Label {
- anchors {
+ Row {
+ anchors{
+ top: parent.top
left: parent.left
leftMargin: units.gu(2)
right: parent.right
rightMargin: units.gu(2)
- verticalCenter: parent.verticalCenter
- }
- elide: Text.ElideRight
- text: model.location.name
+ bottom: parent.bottom
+ }
+ spacing: units.gu(2)
+
+ Label {
+ elide: Text.ElideRight
+ height: locationsListItem.height
+ text: model.location.name
+ verticalAlignment: Text.AlignVCenter
+ }
+
+ Image {
+ id: weatherImage
+ anchors {
+ centerIn: parent
+ }
+ height: units.gu(3)
+ source: locationPage.iconMap[locationPages.contentItem.children[index].iconName]
+ width: units.gu(3)
+ }
+
+ Label {
+ id: nowLabel
+ anchors {
+ right: parent.right
+ }
+ color: UbuntuColors.orange
+ font.pixelSize: units.gu(4)
+ font.weight: Font.Light
+ height: units.gu(6)
+ text: locationPages.contentItem.children[index].currentTemp + settings.tempScale[1]
+ verticalAlignment: Text.AlignVCenter
+ }
}
ListItem.ThinDivider {
Follow ups