← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain into lp:ubuntu-weather-app/reboot

 

Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain into lp:ubuntu-weather-app/reboot.

Commit message:
Add chance of rain

Requested reviews:
  Ubuntu Weather Developers (ubuntu-weather-dev)

For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/reboot-chance-of-rain/+merge/263211

Add chance of rain
-- 
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/reboot-chance-of-rain into lp:ubuntu-weather-app/reboot.
=== modified file 'app/components/DayDelegate.qml'
--- app/components/DayDelegate.qml	2015-06-21 14:02:58 +0000
+++ app/components/DayDelegate.qml	2015-06-29 01:21:43 +0000
@@ -31,7 +31,8 @@
     property alias high: highLabel.text
     property alias low: lowLabel.text
 
-    property alias chanceOfRain: chanceOfRainForecast.chance
+    property alias description: descriptionForecast.text
+    property alias chanceOfRain: chanceOfRainForecast.value
     property alias humidity: humidityForecast.value
     property alias pollen: pollenForecast.value
     property alias sunrise: sunriseForecast.value
@@ -186,15 +187,19 @@
 
             // Overview text
             Label {
-                id: chanceOfRainForecast
+                id: descriptionForecast
                 color: UbuntuColors.coolGrey
                 fontSize: "x-large"
                 horizontalAlignment: Text.AlignHCenter
                 text: i18n.tr("Chance of rain")
                 width: parent.width
                 visible: false  // FIXME: add overview text eg "Chance of flurries"
+            }
 
-                property int chance: 0
+            ForecastDetailsDelegate {
+                id: chanceOfRainForecast
+                forecast: i18n.tr("Chance of rain")
+                imageSource: "../graphics/extended-information_chance-of-rain.svg"
             }
 
             ForecastDetailsDelegate {

=== modified file 'app/components/ForecastDetailsDelegate.qml'
--- app/components/ForecastDetailsDelegate.qml	2015-06-21 15:02:05 +0000
+++ app/components/ForecastDetailsDelegate.qml	2015-06-29 01:21:43 +0000
@@ -38,7 +38,7 @@
     Label {
         id: forecastLabel
         elide: Text.ElideRight
-        width: units.gu(8)
+        width: units.gu(14)
     }
     
     Label {

=== modified file 'app/ui/LocationPane.qml'
--- app/ui/LocationPane.qml	2015-06-21 14:02:58 +0000
+++ app/ui/LocationPane.qml	2015-06-29 01:21:43 +0000
@@ -97,7 +97,7 @@
                     low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,
                     high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",
                     image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : "",
-                    chanceOfRain: forecasts[x].propPrecip === undefined ? -1 : forecasts[x].propPrecip,
+                    chanceOfRain: emptyIfUndefined(forecasts[x].propPrecip, "%"),
                     humidity: emptyIfUndefined(forecasts[x].humidity, "%"),
                     uvIndex: emptyIfUndefined(forecasts[x].uv),
                     wind: forecasts[x][tempUnits].windSpeed === undefined || forecasts[x].windDir === undefined


Follow ups