Merge lp:~neokore/ubuntu-weather-app/SquaredWeatherItems into lp:ubuntu-weather-app/obsolete.trunk
- SquaredWeatherItems
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | David Planella |
Proposed branch: | lp:~neokore/ubuntu-weather-app/SquaredWeatherItems |
Merge into: | lp:ubuntu-weather-app/obsolete.trunk |
Diff against target: |
663 lines (+346/-277) 4 files modified
components/CurrentWeather.qml (+89/-272) components/WeatherDetailComponent.qml (+132/-0) components/WeatherTemperatureComponent.qml (+120/-0) tests/autopilot/ubuntu_weather_app/tests/test_settings.py (+5/-5) |
To merge this branch: | bzr merge lp:~neokore/ubuntu-weather-app/SquaredWeatherItems |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Planella | Disapprove | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Needs Fixing | |
Martin Borho | Needs Fixing | ||
Review via email: mp+180349@code.launchpad.net |
Commit message
Updated the UI to make a first approximation to the final design, so it will need only the final assets and some retouches.
Added a WeatherDetailCo
Description of the change
Updated the UI to make a first approximation to the final design, so it will need only the final assets and some retouches.
Added a WeatherDetailCo
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Martin Borho (martin-borho) wrote : | # |
Cool, very cool!
Some things you should fix before we merge::
- use FontUtils.
- Some test are broken now. Could you replace in tests/autopilot
if units == "imperial":
else:
- In WeatherTemperat
- I've changed yesterday in tests/autopilot
Cheers and Thanks
Martin
Raúl Yeguas (neokore) wrote : | # |
Thank you for your revision, I'll fix everything when I arrive home.
And sorry for breaking the autopilot tests, hehe.
Cheers!
El 15/08/2013 17:12, "Martin Borho" <email address hidden> escribió:
> Review: Needs Fixing
>
> Cool, very cool!
>
> Some things you should fix before we merge::
>
> - use FontUtils.
> CurrentWeather.qml. The text is too msall on the device.
>
> - Some test are broken now. Could you replace in
> tests/autopilot
>
> if units == "imperial":
> self.assertThat
> Eventually(
> self.assertThat
> Eventually(
> else:
> self.assertThat
> Eventually(
> self.assertThat
> Eventually(
>
> - In WeatherTemperat
> objectName:
> above will work.
>
> - I've changed yesterday in
> tests/autopilot
> 121 and 137 "London, GB" and "Hamburg, DE" to "London, United Kingdom" and
> "Hamburg, Germany", since OWM has changed it. Could you switch it back?
> They've changed it back to the old values today and the tests are broken
> now.
>
> Cheers and Thanks
>
> Martin
>
>
> --
>
> https:/
> You are the owner of lp:~neokore/ubuntu-weather-app/SquaredWeatherItems.
>
- 97. By Raúl Yeguas
-
Changed text size using FontUtils.
sizeToPixels and some tweaks for
autopilot tests (thank you Martin)
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:97
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
- 98. By Raúl Yeguas
-
Some little changes in text sizes
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
FAILED: Continuous integration, rev:98
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Martin Borho (martin-borho) wrote : | # |
Raúl, great work!
I've fixed the test in another MP branched from this: https:/
If you want, you can approve it or move the changes in here from http://
Cheers!
Martin
David Planella (dpm) wrote : | # |
Good team work, guys!
Martin, to make things easier for you, in the future if you send a merge proposal based on another branch you can use the "prerequisite branch" field, so that the diff will only show your changes relative to the branch you're based on.
Since the newer merge proposal [1] already includes both Raúl's changes and the fixes to the autopilot tests, I suggest rejecting this one and continue review of the new merge proposal.
[1] https:/
Martin Borho (martin-borho) wrote : | # |
Thanks for the tip, David! I'm not yet familiar enough with launchpad ...
Unmerged revisions
Preview Diff
1 | === modified file 'components/CurrentWeather.qml' | |||
2 | --- components/CurrentWeather.qml 2013-08-05 18:53:33 +0000 | |||
3 | +++ components/CurrentWeather.qml 2013-08-15 19:00:48 +0000 | |||
4 | @@ -38,286 +38,103 @@ | |||
5 | 38 | anchors.fill: parent | 38 | anchors.fill: parent |
6 | 39 | color: "transparent" | 39 | color: "transparent" |
7 | 40 | 40 | ||
179 | 41 | Components.WeatherConditionIconComponent { | 41 | Column { |
180 | 42 | id: currentCondition2 | 42 | id: leftColumn |
181 | 43 | width: units.gu(20) | 43 | anchors { |
182 | 44 | height: units.gu(20) | 44 | horizontalCenter: parent.horizontalCenter |
183 | 45 | anchors.horizontalCenter: parent.horizontalCenter | 45 | horizontalCenterOffset: units.gu(-16) |
184 | 46 | anchors.horizontalCenterOffset: units.gu(-6) | 46 | verticalCenter: parent.verticalCenter |
185 | 47 | condition: currentWeather.icon | 47 | } |
186 | 48 | 48 | spacing: units.gu(1) | |
187 | 49 | NumberAnimation on opacity { | 49 | |
188 | 50 | id: createAnimation2 | 50 | Components.WeatherDetailComponent { |
189 | 51 | easing.type: Easing.Linear | 51 | value: currentWeather.humidity |
190 | 52 | from: 0 | 52 | measure: i18n.tr("Humidity") |
191 | 53 | to: 1 | 53 | unit: i18n.tr('%') |
192 | 54 | duration: 1000 | 54 | width: units.gu(15) |
193 | 55 | } | 55 | } |
194 | 56 | 56 | ||
195 | 57 | Component.onCompleted: { | 57 | Components.WeatherDetailComponent { |
196 | 58 | createAnimation2.start() | 58 | value: currentWeather.windSpeed |
197 | 59 | } | 59 | measure: i18n.tr("Wind speed") |
198 | 60 | } | 60 | unit: currentWeather.speedScale + " " + currentWeather.windDir |
199 | 61 | 61 | } | |
200 | 62 | Rectangle { | 62 | } |
201 | 63 | id: rectangle12 | 63 | |
202 | 64 | width: units.gu(50) | 64 | Column { |
203 | 65 | height: units.gu(10) | 65 | id: rightColumn |
204 | 66 | anchors.horizontalCenter: parent.horizontalCenter | 66 | anchors { |
205 | 67 | anchors.top: currentCondition2.bottom | 67 | horizontalCenter: parent.horizontalCenter |
206 | 68 | anchors.topMargin: 0 | 68 | horizontalCenterOffset: units.gu(0) |
207 | 69 | color: "transparent" | 69 | verticalCenter: parent.verticalCenter |
208 | 70 | 70 | } | |
209 | 71 | Column { | 71 | spacing: units.gu(1) |
210 | 72 | id: column12 | 72 | |
211 | 73 | width: units.gu(5) | 73 | Components.WeatherDetailComponent { |
212 | 74 | height: units.gu(5) | 74 | value: 1004 |
213 | 75 | anchors.rightMargin: units.gu(2) | 75 | measure: i18n.tr("Pressure") |
214 | 76 | anchors.verticalCenter: parent.verticalCenter | 76 | unit: i18n.tr("mbar") |
215 | 77 | anchors.right: tempCurrent2.left | 77 | } |
216 | 78 | visible: showMaxTemp | 78 | |
217 | 79 | 79 | Components.WeatherDetailComponent { | |
218 | 80 | Label { | 80 | value: currentWeather.precipitation |
219 | 81 | text: i18n.tr("Max.") | 81 | measure: i18n.tr("Precipitation") |
220 | 82 | anchors.horizontalCenter: parent.horizontalCenter | 82 | unit: currentWeather.precipScale |
50 | 83 | font.pixelSize: FontUtils.sizeToPixels("small") | ||
51 | 84 | horizontalAlignment: Text.AlignHCenter | ||
52 | 85 | } | ||
53 | 86 | |||
54 | 87 | Label { | ||
55 | 88 | id: tempMax2 | ||
56 | 89 | text: maxTemp+"°"+currentWeather.tempScale | ||
57 | 90 | anchors.horizontalCenter: parent.horizontalCenter | ||
58 | 91 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
59 | 92 | horizontalAlignment: Text.AlignHCenter | ||
60 | 93 | color: Theme.palette.normal.baseText | ||
61 | 94 | } | ||
62 | 95 | } | ||
63 | 96 | |||
64 | 97 | Text { | ||
65 | 98 | width: units.gu(17) | ||
66 | 99 | height: units.gu(10) | ||
67 | 100 | id: tempCurrent2 | ||
68 | 101 | objectName: "CurrentTempText" | ||
69 | 102 | text: currentTemp+String("°")+currentWeather.tempScale | ||
70 | 103 | style: Text.Normal | ||
71 | 104 | font.bold: false | ||
72 | 105 | font.family: "Ubuntu" | ||
73 | 106 | verticalAlignment: Text.AlignVCenter | ||
74 | 107 | anchors.horizontalCenter: parent.horizontalCenter | ||
75 | 108 | anchors.horizontalCenterOffset: (showMaxTemp) ? 0 : -units.gu(4) | ||
76 | 109 | anchors.verticalCenter: parent.verticalCenter | ||
77 | 110 | font.pointSize: 52 | ||
78 | 111 | horizontalAlignment: Text.AlignHCenter | ||
79 | 112 | color: Theme.palette.normal.baseText | ||
80 | 113 | } | ||
81 | 114 | |||
82 | 115 | Column { | ||
83 | 116 | id: column22 | ||
84 | 117 | width: units.gu(5) | ||
85 | 118 | height: units.gu(5) | ||
86 | 119 | anchors.leftMargin: (showMaxTemp) ? units.gu(2) : units.gu(4) | ||
87 | 120 | anchors.verticalCenter: parent.verticalCenter | ||
88 | 121 | anchors.left: tempCurrent2.right | ||
89 | 122 | |||
90 | 123 | Label { | ||
91 | 124 | text: i18n.tr("Min.") | ||
92 | 125 | horizontalAlignment: Text.AlignHCenter | ||
93 | 126 | anchors.horizontalCenter: parent.horizontalCenter | ||
94 | 127 | font.pixelSize: FontUtils.sizeToPixels("small") | ||
95 | 128 | color: Theme.palette.normal.baseText | ||
96 | 129 | } | ||
97 | 130 | |||
98 | 131 | Label { | ||
99 | 132 | id: tempMin2 | ||
100 | 133 | text: minTemp+"°"+currentWeather.tempScale | ||
101 | 134 | horizontalAlignment: Text.AlignHCenter | ||
102 | 135 | anchors.horizontalCenter: parent.horizontalCenter | ||
103 | 136 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
104 | 137 | color: Theme.palette.normal.baseText | ||
105 | 138 | } | ||
106 | 139 | } | ||
107 | 140 | } | ||
108 | 141 | |||
109 | 142 | Column { | ||
110 | 143 | id: windColumn | ||
111 | 144 | anchors.left: currentCondition2.right | ||
112 | 145 | anchors.leftMargin: units.gu(3) | ||
113 | 146 | height: childrenRect.height | ||
114 | 147 | width: childrenRect.width | ||
115 | 148 | |||
116 | 149 | Label { | ||
117 | 150 | id: windLabel | ||
118 | 151 | text: i18n.tr("Wind") | ||
119 | 152 | horizontalAlignment: Text.AlignLeft | ||
120 | 153 | font.pixelSize: FontUtils.sizeToPixels("small") | ||
121 | 154 | color: Theme.palette.normal.baseText | ||
122 | 155 | } | ||
123 | 156 | Label { | ||
124 | 157 | id: windValue | ||
125 | 158 | text: currentWeather.windSpeed+" "+currentWeather.speedScale+" "+currentWeather.windDir | ||
126 | 159 | horizontalAlignment: Text.AlignLeft | ||
127 | 160 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
128 | 161 | color: Theme.palette.normal.baseText | ||
129 | 162 | } | ||
130 | 163 | } | ||
131 | 164 | |||
132 | 165 | Column { | ||
133 | 166 | id: humidityColumn | ||
134 | 167 | anchors.left: currentCondition2.right | ||
135 | 168 | anchors.leftMargin: units.gu(3) | ||
136 | 169 | anchors.top: windColumn.bottom | ||
137 | 170 | anchors.topMargin: units.gu(2) | ||
138 | 171 | height: childrenRect.height | ||
139 | 172 | width: childrenRect.width | ||
140 | 173 | |||
141 | 174 | Label { | ||
142 | 175 | id: humidityLabel | ||
143 | 176 | text: i18n.tr("Humidity") | ||
144 | 177 | horizontalAlignment: Text.AlignLeft | ||
145 | 178 | font.pixelSize: FontUtils.sizeToPixels("small") | ||
146 | 179 | color: Theme.palette.normal.baseText | ||
147 | 180 | } | ||
148 | 181 | Label { | ||
149 | 182 | id: humidityValue | ||
150 | 183 | text: currentWeather.humidity+"%" | ||
151 | 184 | horizontalAlignment: Text.AlignLeft | ||
152 | 185 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
153 | 186 | color: Theme.palette.normal.baseText | ||
154 | 187 | } | ||
155 | 188 | } | ||
156 | 189 | |||
157 | 190 | Column { | ||
158 | 191 | id: precipitationColumn | ||
159 | 192 | anchors.left: currentCondition2.right | ||
160 | 193 | anchors.leftMargin: units.gu(3) | ||
161 | 194 | anchors.top: humidityColumn.bottom | ||
162 | 195 | anchors.topMargin: units.gu(2) | ||
163 | 196 | height: childrenRect.height | ||
164 | 197 | width: childrenRect.width | ||
165 | 198 | |||
166 | 199 | Label { | ||
167 | 200 | id: precipitationLabel | ||
168 | 201 | text: i18n.tr("Precipitation") | ||
169 | 202 | horizontalAlignment: Text.AlignLeft | ||
170 | 203 | font.pixelSize: FontUtils.sizeToPixels("small") | ||
171 | 204 | color: Theme.palette.normal.baseText | ||
172 | 205 | } | ||
173 | 206 | Label { | ||
174 | 207 | id: precipitationValue | ||
175 | 208 | text: currentWeather.precipitation.toFixed(1)+" "+currentWeather.precipScale | ||
176 | 209 | horizontalAlignment: Text.AlignLeft | ||
177 | 210 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
178 | 211 | color: Theme.palette.normal.baseText | ||
221 | 212 | } | 83 | } |
222 | 213 | } | 84 | } |
223 | 214 | } | 85 | } |
224 | 215 | 86 | ||
225 | 216 | front: | 87 | front: |
226 | 217 | Rectangle { | 88 | Rectangle { |
227 | 89 | color: "transparent" | ||
228 | 218 | anchors.fill: parent | 90 | anchors.fill: parent |
232 | 219 | color: "transparent" | 91 | |
233 | 220 | 92 | ||
234 | 221 | Components.WeatherConditionIconComponent { | 93 | UbuntuShape { |
235 | 222 | id: currentCondition | 94 | id: currentCondition |
334 | 223 | width: units.gu(30) | 95 | color: "#20FFFFFF" |
335 | 224 | height: units.gu(30) | 96 | radius: "medium" |
336 | 225 | anchors.horizontalCenter: parent.horizontalCenter | 97 | |
337 | 226 | condition: currentWeather.icon | 98 | width: units.gu(15) |
338 | 227 | 99 | height: units.gu(15) | |
339 | 228 | NumberAnimation on opacity { | 100 | anchors { |
340 | 229 | id: createAnimation | 101 | horizontalCenter: parent.horizontalCenter |
341 | 230 | easing.type: Easing.Linear | 102 | horizontalCenterOffset: units.gu(-8) |
342 | 231 | from: 0 | 103 | verticalCenter: parent.verticalCenter |
343 | 232 | to: 1 | 104 | } |
344 | 233 | duration: 1000 | 105 | |
345 | 234 | } | 106 | Components.WeatherConditionIconComponent { |
346 | 235 | 107 | ||
347 | 236 | Component.onCompleted: { | 108 | anchors.fill: parent |
348 | 237 | createAnimation.start() | 109 | anchors.margins: units.gu(1) |
349 | 238 | } | 110 | condition: currentWeather.icon |
350 | 239 | } | 111 | |
351 | 240 | 112 | NumberAnimation on opacity { | |
352 | 241 | Rectangle { | 113 | id: createAnimation |
353 | 242 | id: rectangle1 | 114 | easing.type: Easing.Linear |
354 | 243 | width: units.gu(50) | 115 | from: 0 |
355 | 244 | height: units.gu(10) | 116 | to: 1 |
356 | 245 | anchors.horizontalCenter: parent.horizontalCenter | 117 | duration: 1000 |
357 | 246 | anchors.top: currentCondition.bottom | 118 | } |
358 | 247 | anchors.topMargin: 0 | 119 | |
359 | 248 | color: "transparent" | 120 | Component.onCompleted: { |
360 | 249 | 121 | createAnimation.start() | |
361 | 250 | Column { | 122 | } |
362 | 251 | id: column1 | 123 | } |
363 | 252 | width: units.gu(5) | 124 | } |
364 | 253 | height: units.gu(5) | 125 | |
365 | 254 | anchors.rightMargin: units.gu(2) | 126 | Components.WeatherTemperatureComponent { |
366 | 255 | anchors.verticalCenter: parent.verticalCenter | 127 | currentTemp: currentWeather.currentTemp |
367 | 256 | anchors.right: tempCurrent.left | 128 | minTemp: currentWeather.minTemp |
368 | 257 | visible: showMaxTemp | 129 | maxTemp: currentWeather.maxTemp |
369 | 258 | 130 | ||
370 | 259 | Label { | 131 | anchors { |
371 | 260 | text: i18n.tr("Max.") | 132 | horizontalCenter: parent.horizontalCenter |
372 | 261 | anchors.horizontalCenter: parent.horizontalCenter | 133 | horizontalCenterOffset: units.gu(8) |
373 | 262 | font.pixelSize: FontUtils.sizeToPixels("small") | 134 | verticalCenter: parent.verticalCenter |
374 | 263 | horizontalAlignment: Text.AlignHCenter | 135 | } |
375 | 264 | } | 136 | } |
376 | 265 | 137 | } | |
279 | 266 | Label { | ||
280 | 267 | id: tempMax | ||
281 | 268 | text: maxTemp+"°"+currentWeather.tempScale | ||
282 | 269 | anchors.horizontalCenter: parent.horizontalCenter | ||
283 | 270 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
284 | 271 | horizontalAlignment: Text.AlignHCenter | ||
285 | 272 | color: Theme.palette.normal.baseText | ||
286 | 273 | } | ||
287 | 274 | } | ||
288 | 275 | |||
289 | 276 | Text { | ||
290 | 277 | width: units.gu(17) | ||
291 | 278 | height: units.gu(10) | ||
292 | 279 | id: tempCurrent | ||
293 | 280 | objectName: "CurrentTempText" | ||
294 | 281 | text: currentTemp+String("°")+currentWeather.tempScale | ||
295 | 282 | style: Text.Normal | ||
296 | 283 | font.bold: false | ||
297 | 284 | font.family: "Ubuntu" | ||
298 | 285 | verticalAlignment: Text.AlignVCenter | ||
299 | 286 | anchors.horizontalCenter: parent.horizontalCenter | ||
300 | 287 | anchors.horizontalCenterOffset: (showMaxTemp) ? 0 : -units.gu(4) | ||
301 | 288 | anchors.verticalCenter: parent.verticalCenter | ||
302 | 289 | font.pointSize: 52 | ||
303 | 290 | horizontalAlignment: Text.AlignHCenter | ||
304 | 291 | color: Theme.palette.normal.baseText | ||
305 | 292 | } | ||
306 | 293 | |||
307 | 294 | Column { | ||
308 | 295 | id: column2 | ||
309 | 296 | width: units.gu(5) | ||
310 | 297 | height: units.gu(5) | ||
311 | 298 | anchors.leftMargin: (showMaxTemp) ? units.gu(2) : units.gu(4) | ||
312 | 299 | anchors.verticalCenter: parent.verticalCenter | ||
313 | 300 | anchors.left: tempCurrent.right | ||
314 | 301 | |||
315 | 302 | Label { | ||
316 | 303 | text: i18n.tr("Min.") | ||
317 | 304 | horizontalAlignment: Text.AlignHCenter | ||
318 | 305 | anchors.horizontalCenter: parent.horizontalCenter | ||
319 | 306 | font.pixelSize: FontUtils.sizeToPixels("small") | ||
320 | 307 | color: Theme.palette.normal.baseText | ||
321 | 308 | } | ||
322 | 309 | |||
323 | 310 | Label { | ||
324 | 311 | id: tempMin | ||
325 | 312 | text: minTemp+"°"+currentWeather.tempScale | ||
326 | 313 | horizontalAlignment: Text.AlignHCenter | ||
327 | 314 | anchors.horizontalCenter: parent.horizontalCenter | ||
328 | 315 | font.pixelSize: FontUtils.sizeToPixels("large") | ||
329 | 316 | color: Theme.palette.normal.baseText | ||
330 | 317 | } | ||
331 | 318 | } | ||
332 | 319 | } | ||
333 | 320 | } | ||
377 | 321 | 138 | ||
378 | 322 | transform: Rotation { | 139 | transform: Rotation { |
379 | 323 | id: rotation | 140 | id: rotation |
380 | 324 | 141 | ||
381 | === added file 'components/WeatherDetailComponent.qml' | |||
382 | --- components/WeatherDetailComponent.qml 1970-01-01 00:00:00 +0000 | |||
383 | +++ components/WeatherDetailComponent.qml 2013-08-15 19:00:48 +0000 | |||
384 | @@ -0,0 +1,132 @@ | |||
385 | 1 | import QtQuick 2.0 | ||
386 | 2 | import QtGraphicalEffects 1.0 | ||
387 | 3 | import Ubuntu.Components 0.1 | ||
388 | 4 | |||
389 | 5 | UbuntuShape { | ||
390 | 6 | id: infoComponent | ||
391 | 7 | color: "#20FFFFFF" | ||
392 | 8 | radius: "medium" | ||
393 | 9 | |||
394 | 10 | width: units.gu(15) | ||
395 | 11 | height: units.gu(15) | ||
396 | 12 | anchors { | ||
397 | 13 | horizontalCenter: parent.horizontalCenter | ||
398 | 14 | horizontalCenterOffset: units.gu(8) | ||
399 | 15 | } | ||
400 | 16 | |||
401 | 17 | property real value: 99.99 | ||
402 | 18 | property string measure: "Wind speed" | ||
403 | 19 | property string unit: "kmph SE" | ||
404 | 20 | |||
405 | 21 | Text { | ||
406 | 22 | id: measure | ||
407 | 23 | text: infoComponent.measure | ||
408 | 24 | color: Theme.palette.normal.baseText | ||
409 | 25 | style: Text.Raised | ||
410 | 26 | font.bold: false | ||
411 | 27 | font.family: "Ubuntu" | ||
412 | 28 | font.pointSize: FontUtils.sizeToPixels("x-small") //9 | ||
413 | 29 | fontSizeMode: Text.Fit | ||
414 | 30 | verticalAlignment: Text.AlignVCenter | ||
415 | 31 | horizontalAlignment: Text.AlignHCenter | ||
416 | 32 | anchors { | ||
417 | 33 | left: parent.left | ||
418 | 34 | leftMargin: units.gu(2) | ||
419 | 35 | top: parent.top | ||
420 | 36 | topMargin: units.gu(2) | ||
421 | 37 | } | ||
422 | 38 | } | ||
423 | 39 | |||
424 | 40 | Rectangle { | ||
425 | 41 | id:line1 | ||
426 | 42 | color: "#55000000" | ||
427 | 43 | anchors { | ||
428 | 44 | top: measure.bottom | ||
429 | 45 | topMargin: units.gu(0.5) | ||
430 | 46 | left: parent.left | ||
431 | 47 | leftMargin: units.gu(2) | ||
432 | 48 | right: parent.right | ||
433 | 49 | rightMargin: units.gu(2) | ||
434 | 50 | } | ||
435 | 51 | height: 1 | ||
436 | 52 | width: units.gu(10) | ||
437 | 53 | } | ||
438 | 54 | Rectangle { | ||
439 | 55 | color: "#55FFFFFF" | ||
440 | 56 | anchors { | ||
441 | 57 | top: line1.bottom | ||
442 | 58 | bottomMargin: 1 | ||
443 | 59 | left: line1.left | ||
444 | 60 | right: line1.right | ||
445 | 61 | } | ||
446 | 62 | height: 1 | ||
447 | 63 | width: units.gu(10) | ||
448 | 64 | |||
449 | 65 | } | ||
450 | 66 | |||
451 | 67 | Text { | ||
452 | 68 | id: value | ||
453 | 69 | objectName: "CurrentTempText" | ||
454 | 70 | text: infoComponent.value.toPrecision() | ||
455 | 71 | color: Theme.palette.normal.baseText | ||
456 | 72 | style: Text.Raised | ||
457 | 73 | font.bold: false | ||
458 | 74 | font.family: "Ubuntu" | ||
459 | 75 | font.pointSize: FontUtils.sizeToPixels("x-large") //36 | ||
460 | 76 | fontSizeMode: Text.Fit | ||
461 | 77 | verticalAlignment: Text.AlignVCenter | ||
462 | 78 | horizontalAlignment: Text.AlignLeft | ||
463 | 79 | anchors { | ||
464 | 80 | verticalCenter: parent.verticalCenter | ||
465 | 81 | left: parent.left | ||
466 | 82 | leftMargin: units.gu(2) | ||
467 | 83 | right: parent.right | ||
468 | 84 | rightMargin: units.gu(2) | ||
469 | 85 | } | ||
470 | 86 | } | ||
471 | 87 | |||
472 | 88 | Rectangle { | ||
473 | 89 | id: line2 | ||
474 | 90 | color: "#55000000" | ||
475 | 91 | anchors { | ||
476 | 92 | bottom: unit.top | ||
477 | 93 | bottomMargin: units.gu(0.5) | ||
478 | 94 | left: parent.left | ||
479 | 95 | leftMargin: units.gu(2) | ||
480 | 96 | right: parent.right | ||
481 | 97 | rightMargin: units.gu(2) | ||
482 | 98 | } | ||
483 | 99 | height: 1 | ||
484 | 100 | width: units.gu(10) | ||
485 | 101 | |||
486 | 102 | } | ||
487 | 103 | Rectangle { | ||
488 | 104 | color: "#55FFFFFF" | ||
489 | 105 | anchors { | ||
490 | 106 | top: line2.bottom | ||
491 | 107 | bottomMargin: 1 | ||
492 | 108 | left: line2.left | ||
493 | 109 | right: line2.right | ||
494 | 110 | } | ||
495 | 111 | height: 1 | ||
496 | 112 | width: units.gu(10) | ||
497 | 113 | } | ||
498 | 114 | |||
499 | 115 | Text { | ||
500 | 116 | id: unit | ||
501 | 117 | text: infoComponent.unit | ||
502 | 118 | color: Theme.palette.normal.baseText | ||
503 | 119 | style: Text.Raised | ||
504 | 120 | font.bold: false | ||
505 | 121 | font.family: "Ubuntu" | ||
506 | 122 | font.pointSize: FontUtils.sizeToPixels("x-small") //9 | ||
507 | 123 | verticalAlignment: Text.AlignVCenter | ||
508 | 124 | horizontalAlignment: Text.AlignHCenter | ||
509 | 125 | anchors { | ||
510 | 126 | bottom: parent.bottom | ||
511 | 127 | bottomMargin: units.gu(2) | ||
512 | 128 | left: parent.left | ||
513 | 129 | leftMargin: units.gu(2) | ||
514 | 130 | } | ||
515 | 131 | } | ||
516 | 132 | } | ||
517 | 0 | 133 | ||
518 | === added file 'components/WeatherTemperatureComponent.qml' | |||
519 | --- components/WeatherTemperatureComponent.qml 1970-01-01 00:00:00 +0000 | |||
520 | +++ components/WeatherTemperatureComponent.qml 2013-08-15 19:00:48 +0000 | |||
521 | @@ -0,0 +1,120 @@ | |||
522 | 1 | import QtQuick 2.0 | ||
523 | 2 | import QtGraphicalEffects 1.0 | ||
524 | 3 | import Ubuntu.Components 0.1 | ||
525 | 4 | |||
526 | 5 | UbuntuShape { | ||
527 | 6 | id: tempComponent | ||
528 | 7 | color: "#20FFFFFF" | ||
529 | 8 | radius: "medium" | ||
530 | 9 | |||
531 | 10 | width: units.gu(15) | ||
532 | 11 | height: units.gu(15) | ||
533 | 12 | |||
534 | 13 | property int currentTemp: 27 | ||
535 | 14 | property int maxTemp: 35 | ||
536 | 15 | property int minTemp: 27 | ||
537 | 16 | |||
538 | 17 | Text { | ||
539 | 18 | id: value | ||
540 | 19 | text: tempComponent.currentTemp | ||
541 | 20 | color: Theme.palette.normal.baseText | ||
542 | 21 | style: Text.Raised | ||
543 | 22 | font.bold: false | ||
544 | 23 | font.family: "Ubuntu" | ||
545 | 24 | font.pointSize: 64 //FontUtils.sizeToPixels("x-large") | ||
546 | 25 | font.letterSpacing: -2 | ||
547 | 26 | fontSizeMode: Text.Fit | ||
548 | 27 | verticalAlignment: Text.AlignTop | ||
549 | 28 | horizontalAlignment: Text.AlignRight | ||
550 | 29 | height: units.gu(9) | ||
551 | 30 | width: units.gu(9) | ||
552 | 31 | anchors { | ||
553 | 32 | top: parent.top | ||
554 | 33 | topMargin: units.gu(1) | ||
555 | 34 | left: parent.left | ||
556 | 35 | leftMargin: units.gu(1) | ||
557 | 36 | } | ||
558 | 37 | } | ||
559 | 38 | Text { | ||
560 | 39 | id: currentTempScale | ||
561 | 40 | text: String("°") | ||
562 | 41 | style: Text.Raised | ||
563 | 42 | font.bold: false | ||
564 | 43 | font.family: "Ubuntu" | ||
565 | 44 | font.pointSize: FontUtils.sizeToPixels("x-large") //32 | ||
566 | 45 | verticalAlignment: Text.AlignTop | ||
567 | 46 | horizontalAlignment: Text.AlignLeft | ||
568 | 47 | color: Theme.palette.normal.baseText | ||
569 | 48 | height: units.gu(9) | ||
570 | 49 | anchors { | ||
571 | 50 | top: value.top | ||
572 | 51 | topMargin: units.gu(0.5) | ||
573 | 52 | left: value.right | ||
574 | 53 | } | ||
575 | 54 | } | ||
576 | 55 | |||
577 | 56 | Rectangle { | ||
578 | 57 | id: line2 | ||
579 | 58 | color: "#55000000" | ||
580 | 59 | anchors { | ||
581 | 60 | top: value.bottom | ||
582 | 61 | left: parent.left | ||
583 | 62 | leftMargin: units.gu(2) | ||
584 | 63 | right: parent.right | ||
585 | 64 | rightMargin: units.gu(2) | ||
586 | 65 | } | ||
587 | 66 | height: 1 | ||
588 | 67 | width: units.gu(10) | ||
589 | 68 | |||
590 | 69 | } | ||
591 | 70 | Rectangle { | ||
592 | 71 | color: "#55FFFFFF" | ||
593 | 72 | anchors { | ||
594 | 73 | top: line2.bottom | ||
595 | 74 | bottomMargin: 1 | ||
596 | 75 | left: line2.left | ||
597 | 76 | right: line2.right | ||
598 | 77 | } | ||
599 | 78 | height: 1 | ||
600 | 79 | width: units.gu(10) | ||
601 | 80 | |||
602 | 81 | } | ||
603 | 82 | |||
604 | 83 | |||
605 | 84 | Text { | ||
606 | 85 | id: max | ||
607 | 86 | text: i18n.tr("H: ")+tempComponent.maxTemp | ||
608 | 87 | color: Theme.palette.normal.baseText | ||
609 | 88 | style: Text.Raised | ||
610 | 89 | font.bold: false | ||
611 | 90 | font.family: "Ubuntu" | ||
612 | 91 | font.pointSize: FontUtils.sizeToPixels("small") | ||
613 | 92 | verticalAlignment: Text.AlignVCenter | ||
614 | 93 | horizontalAlignment: Text.AlignHCenter | ||
615 | 94 | anchors { | ||
616 | 95 | bottom: parent.bottom | ||
617 | 96 | bottomMargin: units.gu(2) | ||
618 | 97 | left: parent.left | ||
619 | 98 | leftMargin: units.gu(2) | ||
620 | 99 | } | ||
621 | 100 | } | ||
622 | 101 | |||
623 | 102 | Text { | ||
624 | 103 | id: min | ||
625 | 104 | text: i18n.tr("L: ")+tempComponent.minTemp | ||
626 | 105 | color: Theme.palette.normal.baseText | ||
627 | 106 | style: Text.Raised | ||
628 | 107 | font.bold: false | ||
629 | 108 | font.family: "Ubuntu" | ||
630 | 109 | font.pointSize: FontUtils.sizeToPixels("small") | ||
631 | 110 | fontSizeMode: Text.Fit | ||
632 | 111 | verticalAlignment: Text.AlignVCenter | ||
633 | 112 | horizontalAlignment: Text.AlignHCenter | ||
634 | 113 | anchors { | ||
635 | 114 | bottom: parent.bottom | ||
636 | 115 | bottomMargin: units.gu(2) | ||
637 | 116 | right: parent.right | ||
638 | 117 | rightMargin: units.gu(2) | ||
639 | 118 | } | ||
640 | 119 | } | ||
641 | 120 | } | ||
642 | 0 | 121 | ||
643 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_settings.py' | |||
644 | --- tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-14 20:28:56 +0000 | |||
645 | +++ tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-15 19:00:48 +0000 | |||
646 | @@ -37,12 +37,12 @@ | |||
647 | 37 | def _check_units(self, units): | 37 | def _check_units(self, units): |
648 | 38 | """Checks selected units by values from the first location tab""" | 38 | """Checks selected units by values from the first location tab""" |
649 | 39 | current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText') | 39 | current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText') |
653 | 40 | if units == "imperial": | 40 | if units == "imperial": |
654 | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F'))) | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70'))) |
655 | 42 | self.assertThat(current_temps[2].text, Eventually(Equals(u'73°F'))) | 42 | self.assertThat(current_temps[1].text, Eventually(Equals(u'73'))) |
656 | 43 | else: | 43 | else: |
659 | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C'))) | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21'))) |
660 | 45 | self.assertThat(current_temps[2].text, Eventually(Equals(u'23°C'))) | 45 | self.assertThat(current_temps[1].text, Eventually(Equals(u'23'))) |
661 | 46 | 46 | ||
662 | 47 | def test_switch_scale(self): | 47 | def test_switch_scale(self): |
663 | 48 | """Tests switching the scale in the settings""" | 48 | """Tests switching the scale in the settings""" |
PASSED: Continuous integration, rev:96 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 37/ 91.189. 93.70:8080/ job/ubuntu- weather- app-precise- amd64-ci/ 29 91.189. 93.70:8080/ job/ubuntu- weather- app-quantal- amd64-ci/ 36 91.189. 93.70:8080/ job/ubuntu- weather- app-raring- amd64-ci/ 36 91.189. 93.70:8080/ job/ubuntu- weather- app-saucy- amd64-ci/ 29
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 37/rebuild
http://