Merge lp:~martin-borho/ubuntu-weather-app/SquaredWeatherItems2 into lp:ubuntu-weather-app/obsolete.trunk
- SquaredWeatherItems2
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Raúl Yeguas |
Approved revision: | 100 |
Merged at revision: | 97 |
Proposed branch: | lp:~martin-borho/ubuntu-weather-app/SquaredWeatherItems2 |
Merge into: | lp:ubuntu-weather-app/obsolete.trunk |
Diff against target: |
662 lines (+346/-276) 4 files modified
components/CurrentWeather.qml (+89/-272) components/WeatherDetailComponent.qml (+132/-0) components/WeatherTemperatureComponent.qml (+121/-0) tests/autopilot/ubuntu_weather_app/tests/test_settings.py (+4/-4) |
To merge this branch: | bzr merge lp:~martin-borho/ubuntu-weather-app/SquaredWeatherItems2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raúl Yeguas | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+180925@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
* test
* trying to fix continuous integration, merged dependency fix from trunk
* branched from https:/
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
- 100. By Martin Borho
-
fixed autopilot tests
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
PASSED: Continuous integration, rev:100
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Raúl Yeguas (neokore) wrote : | # |
Great work, Martin! Sorry for the delay. Thank you!
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-19 18:58:54 +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-19 18:58:54 +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-19 18:58:54 +0000 | |||
521 | @@ -0,0 +1,121 @@ | |||
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 | objectName: "CurrentTempText" | ||
541 | 20 | text: tempComponent.currentTemp | ||
542 | 21 | color: Theme.palette.normal.baseText | ||
543 | 22 | style: Text.Raised | ||
544 | 23 | font.bold: false | ||
545 | 24 | font.family: "Ubuntu" | ||
546 | 25 | font.pointSize: 64 //FontUtils.sizeToPixels("x-large") | ||
547 | 26 | font.letterSpacing: -2 | ||
548 | 27 | fontSizeMode: Text.Fit | ||
549 | 28 | verticalAlignment: Text.AlignTop | ||
550 | 29 | horizontalAlignment: Text.AlignRight | ||
551 | 30 | height: units.gu(9) | ||
552 | 31 | width: units.gu(9) | ||
553 | 32 | anchors { | ||
554 | 33 | top: parent.top | ||
555 | 34 | topMargin: units.gu(1) | ||
556 | 35 | left: parent.left | ||
557 | 36 | leftMargin: units.gu(1) | ||
558 | 37 | } | ||
559 | 38 | } | ||
560 | 39 | Text { | ||
561 | 40 | id: currentTempScale | ||
562 | 41 | text: String("°") | ||
563 | 42 | style: Text.Raised | ||
564 | 43 | font.bold: false | ||
565 | 44 | font.family: "Ubuntu" | ||
566 | 45 | font.pointSize: FontUtils.sizeToPixels("x-large") //32 | ||
567 | 46 | verticalAlignment: Text.AlignTop | ||
568 | 47 | horizontalAlignment: Text.AlignLeft | ||
569 | 48 | color: Theme.palette.normal.baseText | ||
570 | 49 | height: units.gu(9) | ||
571 | 50 | anchors { | ||
572 | 51 | top: value.top | ||
573 | 52 | topMargin: units.gu(0.5) | ||
574 | 53 | left: value.right | ||
575 | 54 | } | ||
576 | 55 | } | ||
577 | 56 | |||
578 | 57 | Rectangle { | ||
579 | 58 | id: line2 | ||
580 | 59 | color: "#55000000" | ||
581 | 60 | anchors { | ||
582 | 61 | top: value.bottom | ||
583 | 62 | left: parent.left | ||
584 | 63 | leftMargin: units.gu(2) | ||
585 | 64 | right: parent.right | ||
586 | 65 | rightMargin: units.gu(2) | ||
587 | 66 | } | ||
588 | 67 | height: 1 | ||
589 | 68 | width: units.gu(10) | ||
590 | 69 | |||
591 | 70 | } | ||
592 | 71 | Rectangle { | ||
593 | 72 | color: "#55FFFFFF" | ||
594 | 73 | anchors { | ||
595 | 74 | top: line2.bottom | ||
596 | 75 | bottomMargin: 1 | ||
597 | 76 | left: line2.left | ||
598 | 77 | right: line2.right | ||
599 | 78 | } | ||
600 | 79 | height: 1 | ||
601 | 80 | width: units.gu(10) | ||
602 | 81 | |||
603 | 82 | } | ||
604 | 83 | |||
605 | 84 | |||
606 | 85 | Text { | ||
607 | 86 | id: max | ||
608 | 87 | text: i18n.tr("H: ")+tempComponent.maxTemp | ||
609 | 88 | color: Theme.palette.normal.baseText | ||
610 | 89 | style: Text.Raised | ||
611 | 90 | font.bold: false | ||
612 | 91 | font.family: "Ubuntu" | ||
613 | 92 | font.pointSize: FontUtils.sizeToPixels("small") | ||
614 | 93 | verticalAlignment: Text.AlignVCenter | ||
615 | 94 | horizontalAlignment: Text.AlignHCenter | ||
616 | 95 | anchors { | ||
617 | 96 | bottom: parent.bottom | ||
618 | 97 | bottomMargin: units.gu(2) | ||
619 | 98 | left: parent.left | ||
620 | 99 | leftMargin: units.gu(2) | ||
621 | 100 | } | ||
622 | 101 | } | ||
623 | 102 | |||
624 | 103 | Text { | ||
625 | 104 | id: min | ||
626 | 105 | text: i18n.tr("L: ")+tempComponent.minTemp | ||
627 | 106 | color: Theme.palette.normal.baseText | ||
628 | 107 | style: Text.Raised | ||
629 | 108 | font.bold: false | ||
630 | 109 | font.family: "Ubuntu" | ||
631 | 110 | font.pointSize: FontUtils.sizeToPixels("small") | ||
632 | 111 | fontSizeMode: Text.Fit | ||
633 | 112 | verticalAlignment: Text.AlignVCenter | ||
634 | 113 | horizontalAlignment: Text.AlignHCenter | ||
635 | 114 | anchors { | ||
636 | 115 | bottom: parent.bottom | ||
637 | 116 | bottomMargin: units.gu(2) | ||
638 | 117 | right: parent.right | ||
639 | 118 | rightMargin: units.gu(2) | ||
640 | 119 | } | ||
641 | 120 | } | ||
642 | 121 | } | ||
643 | 0 | 122 | ||
644 | === modified file 'tests/autopilot/ubuntu_weather_app/tests/test_settings.py' | |||
645 | --- tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-14 20:28:56 +0000 | |||
646 | +++ tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-19 18:58:54 +0000 | |||
647 | @@ -38,11 +38,11 @@ | |||
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') |
650 | 40 | if units == "imperial": | 40 | if units == "imperial": |
653 | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F'))) | 41 | self.assertThat(current_temps[0].text, Eventually(Equals(u'70'))) |
654 | 42 | self.assertThat(current_temps[2].text, Eventually(Equals(u'73°F'))) | 42 | self.assertThat(current_temps[1].text, Eventually(Equals(u'73'))) |
655 | 43 | else: | 43 | else: |
658 | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C'))) | 44 | self.assertThat(current_temps[0].text, Eventually(Equals(u'21'))) |
659 | 45 | self.assertThat(current_temps[2].text, Eventually(Equals(u'23°C'))) | 45 | self.assertThat(current_temps[1].text, Eventually(Equals(u'23'))) |
660 | 46 | 46 | ||
661 | 47 | def test_switch_scale(self): | 47 | def test_switch_scale(self): |
662 | 48 | """Tests switching the scale in the settings""" | 48 | """Tests switching the scale in the settings""" |
FAILED: Continuous integration, rev:99 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 42/ 91.189. 93.70:8080/ job/generic- mediumtests/ 389 91.189. 93.70:8080/ job/ubuntu- weather- app-precise- amd64-ci/ 34 91.189. 93.70:8080/ job/ubuntu- weather- app-quantal- amd64-ci/ 41 91.189. 93.70:8080/ job/ubuntu- weather- app-raring- amd64-ci/ 41 91.189. 93.70:8080/ job/ubuntu- weather- app-saucy- amd64-ci/ 34
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 42/rebuild
http://