Merge lp:~vthompson/ubuntu-weather-app/reboot-add-condition-text into lp:ubuntu-weather-app

Proposed by Victor Thompson on 2015-06-30
Status: Superseded
Proposed branch: lp:~vthompson/ubuntu-weather-app/reboot-add-condition-text
Merge into: lp:ubuntu-weather-app
Diff against target: 70 lines (+12/-7)
3 files modified
app/components/DayDelegate.qml (+8/-5)
app/components/ForecastDetailsDelegate.qml (+1/-1)
app/ui/LocationPane.qml (+3/-1)
To merge this branch: bzr merge lp:~vthompson/ubuntu-weather-app/reboot-add-condition-text
Reviewer Review Type Date Requested Status
Ubuntu Weather Developers 2015-06-30 Pending
Review via email: mp+263306@code.launchpad.net

Commit message

Add conditions text to day delegate.

Description of the change

Add conditions text to day delegate.

To post a comment you must log in.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/DayDelegate.qml'
2--- app/components/DayDelegate.qml 2015-06-21 14:02:58 +0000
3+++ app/components/DayDelegate.qml 2015-06-30 00:48:03 +0000
4@@ -31,7 +31,8 @@
5 property alias high: highLabel.text
6 property alias low: lowLabel.text
7
8- property alias chanceOfRain: chanceOfRainForecast.chance
9+ property alias condition: conditionForecast.text
10+ property alias chanceOfRain: chanceOfRainForecast.value
11 property alias humidity: humidityForecast.value
12 property alias pollen: pollenForecast.value
13 property alias sunrise: sunriseForecast.value
14@@ -186,15 +187,17 @@
15
16 // Overview text
17 Label {
18- id: chanceOfRainForecast
19+ id: conditionForecast
20 color: UbuntuColors.coolGrey
21 fontSize: "x-large"
22 horizontalAlignment: Text.AlignHCenter
23- text: i18n.tr("Chance of rain")
24 width: parent.width
25- visible: false // FIXME: add overview text eg "Chance of flurries"
26+ }
27
28- property int chance: 0
29+ ForecastDetailsDelegate {
30+ id: chanceOfRainForecast
31+ forecast: i18n.tr("Chance of rain")
32+ imageSource: "../graphics/extended-information_chance-of-rain.svg"
33 }
34
35 ForecastDetailsDelegate {
36
37=== modified file 'app/components/ForecastDetailsDelegate.qml'
38--- app/components/ForecastDetailsDelegate.qml 2015-06-21 15:02:05 +0000
39+++ app/components/ForecastDetailsDelegate.qml 2015-06-30 00:48:03 +0000
40@@ -38,7 +38,7 @@
41 Label {
42 id: forecastLabel
43 elide: Text.ElideRight
44- width: units.gu(8)
45+ width: units.gu(14)
46 }
47
48 Label {
49
50=== modified file 'app/ui/LocationPane.qml'
51--- app/ui/LocationPane.qml 2015-06-21 14:02:58 +0000
52+++ app/ui/LocationPane.qml 2015-06-30 00:48:03 +0000
53@@ -97,7 +97,8 @@
54 low: Math.round(forecasts[x][tempUnits].tempMin).toString() + settings.tempScale,
55 high: (forecasts[x][tempUnits].tempMax !== undefined) ? Math.round(forecasts[x][tempUnits].tempMax).toString() + settings.tempScale : "",
56 image: (forecasts[x].icon !== undefined && iconMap[forecasts[x].icon] !== undefined) ? iconMap[forecasts[x].icon] : "",
57- chanceOfRain: forecasts[x].propPrecip === undefined ? -1 : forecasts[x].propPrecip,
58+ condition: emptyIfUndefined(forecasts[x].condition),
59+ chanceOfRain: emptyIfUndefined(forecasts[x].propPrecip, "%"),
60 humidity: emptyIfUndefined(forecasts[x].humidity, "%"),
61 uvIndex: emptyIfUndefined(forecasts[x].uv),
62 wind: forecasts[x][tempUnits].windSpeed === undefined || forecasts[x].windDir === undefined
63@@ -181,6 +182,7 @@
64 image: model.image
65 low: model.low
66
67+ condition: model.condition
68 chanceOfRain: model.chanceOfRain
69 humidity: model.humidity
70 // TODO: extra from API

Subscribers

People subscribed via source and target branches

to all changes: