Merge lp:~neokore/ubuntu-weather-app/SquaredWeatherItems into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Raúl Yeguas
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
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 WeatherDetailComponent and a WeatherTemperatureComponent.

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 WeatherDetailComponent and a WeatherTemperatureComponent.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Cool, very cool!

Some things you should fix before we merge::

- use FontUtils.sizeToPixels for the text sizes, see old version of CurrentWeather.qml. The text is too msall on the device.

- Some test are broken now. Could you replace in tests/autopilot/ubuntu_weather_app/tests/test_settings.py in Line 40ff to

        if units == "imperial":
            self.assertThat(current_temps[0].text, Eventually(Equals(u'70')))
            self.assertThat(current_temps[1].text, Eventually(Equals(u'73')))
        else:
            self.assertThat(current_temps[0].text, Eventually(Equals(u'21')))
            self.assertThat(current_temps[1].text, Eventually(Equals(u'23')))

- In WeatherTemperatureComponent could you please add objectName:"CurrentTempText" to the Text with id "value", so the tests above will work.

- I've changed yesterday in tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py in Lines 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

review: Needs Fixing
Revision history for this message
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.sizeToPixels for the text sizes, see old version of
> CurrentWeather.qml. The text is too msall on the device.
>
> - Some test are broken now. Could you replace in
> tests/autopilot/ubuntu_weather_app/tests/test_settings.py in Line 40ff to
>
> if units == "imperial":
> self.assertThat(current_temps[0].text,
> Eventually(Equals(u'70')))
> self.assertThat(current_temps[1].text,
> Eventually(Equals(u'73')))
> else:
> self.assertThat(current_temps[0].text,
> Eventually(Equals(u'21')))
> self.assertThat(current_temps[1].text,
> Eventually(Equals(u'23')))
>
> - In WeatherTemperatureComponent could you please add
> objectName:"CurrentTempText" to the Text with id "value", so the tests
> above will work.
>
> - I've changed yesterday in
> tests/autopilot/ubuntu_weather_app/tests/test_locationmanager.py in Lines
> 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://code.launchpad.net/~neokore/ubuntu-weather-app/SquaredWeatherItems/+merge/180349
> 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)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
98. By Raúl Yeguas

Some little changes in text sizes

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Raúl, great work!

I've fixed the test in another MP branched from this: https://code.launchpad.net/~martin-borho/ubuntu-weather-app/SquaredWeatherItems2/+merge/180925

If you want, you can approve it or move the changes in here from http://bazaar.launchpad.net/~martin-borho/ubuntu-weather-app/SquaredWeatherItems2/revision/100

Cheers!
Martin

Revision history for this message
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://code.launchpad.net/~martin-borho/ubuntu-weather-app/SquaredWeatherItems2/+merge/180925

review: Disapprove
Revision history for this message
Martin Borho (martin-borho) wrote :

Thanks for the tip, David! I'm not yet familiar enough with launchpad ...

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 anchors.fill: parent
6 color: "transparent"
7
8- Components.WeatherConditionIconComponent {
9- id: currentCondition2
10- width: units.gu(20)
11- height: units.gu(20)
12- anchors.horizontalCenter: parent.horizontalCenter
13- anchors.horizontalCenterOffset: units.gu(-6)
14- condition: currentWeather.icon
15-
16- NumberAnimation on opacity {
17- id: createAnimation2
18- easing.type: Easing.Linear
19- from: 0
20- to: 1
21- duration: 1000
22- }
23-
24- Component.onCompleted: {
25- createAnimation2.start()
26- }
27- }
28-
29- Rectangle {
30- id: rectangle12
31- width: units.gu(50)
32- height: units.gu(10)
33- anchors.horizontalCenter: parent.horizontalCenter
34- anchors.top: currentCondition2.bottom
35- anchors.topMargin: 0
36- color: "transparent"
37-
38- Column {
39- id: column12
40- width: units.gu(5)
41- height: units.gu(5)
42- anchors.rightMargin: units.gu(2)
43- anchors.verticalCenter: parent.verticalCenter
44- anchors.right: tempCurrent2.left
45- visible: showMaxTemp
46-
47- Label {
48- text: i18n.tr("Max.")
49- anchors.horizontalCenter: parent.horizontalCenter
50- font.pixelSize: FontUtils.sizeToPixels("small")
51- horizontalAlignment: Text.AlignHCenter
52- }
53-
54- Label {
55- id: tempMax2
56- text: maxTemp+"°"+currentWeather.tempScale
57- anchors.horizontalCenter: parent.horizontalCenter
58- font.pixelSize: FontUtils.sizeToPixels("large")
59- horizontalAlignment: Text.AlignHCenter
60- color: Theme.palette.normal.baseText
61- }
62- }
63-
64- Text {
65- width: units.gu(17)
66- height: units.gu(10)
67- id: tempCurrent2
68- objectName: "CurrentTempText"
69- text: currentTemp+String("°")+currentWeather.tempScale
70- style: Text.Normal
71- font.bold: false
72- font.family: "Ubuntu"
73- verticalAlignment: Text.AlignVCenter
74- anchors.horizontalCenter: parent.horizontalCenter
75- anchors.horizontalCenterOffset: (showMaxTemp) ? 0 : -units.gu(4)
76- anchors.verticalCenter: parent.verticalCenter
77- font.pointSize: 52
78- horizontalAlignment: Text.AlignHCenter
79- color: Theme.palette.normal.baseText
80- }
81-
82- Column {
83- id: column22
84- width: units.gu(5)
85- height: units.gu(5)
86- anchors.leftMargin: (showMaxTemp) ? units.gu(2) : units.gu(4)
87- anchors.verticalCenter: parent.verticalCenter
88- anchors.left: tempCurrent2.right
89-
90- Label {
91- text: i18n.tr("Min.")
92- horizontalAlignment: Text.AlignHCenter
93- anchors.horizontalCenter: parent.horizontalCenter
94- font.pixelSize: FontUtils.sizeToPixels("small")
95- color: Theme.palette.normal.baseText
96- }
97-
98- Label {
99- id: tempMin2
100- text: minTemp+"°"+currentWeather.tempScale
101- horizontalAlignment: Text.AlignHCenter
102- anchors.horizontalCenter: parent.horizontalCenter
103- font.pixelSize: FontUtils.sizeToPixels("large")
104- color: Theme.palette.normal.baseText
105- }
106- }
107- }
108-
109- Column {
110- id: windColumn
111- anchors.left: currentCondition2.right
112- anchors.leftMargin: units.gu(3)
113- height: childrenRect.height
114- width: childrenRect.width
115-
116- Label {
117- id: windLabel
118- text: i18n.tr("Wind")
119- horizontalAlignment: Text.AlignLeft
120- font.pixelSize: FontUtils.sizeToPixels("small")
121- color: Theme.palette.normal.baseText
122- }
123- Label {
124- id: windValue
125- text: currentWeather.windSpeed+" "+currentWeather.speedScale+" "+currentWeather.windDir
126- horizontalAlignment: Text.AlignLeft
127- font.pixelSize: FontUtils.sizeToPixels("large")
128- color: Theme.palette.normal.baseText
129- }
130- }
131-
132- Column {
133- id: humidityColumn
134- anchors.left: currentCondition2.right
135- anchors.leftMargin: units.gu(3)
136- anchors.top: windColumn.bottom
137- anchors.topMargin: units.gu(2)
138- height: childrenRect.height
139- width: childrenRect.width
140-
141- Label {
142- id: humidityLabel
143- text: i18n.tr("Humidity")
144- horizontalAlignment: Text.AlignLeft
145- font.pixelSize: FontUtils.sizeToPixels("small")
146- color: Theme.palette.normal.baseText
147- }
148- Label {
149- id: humidityValue
150- text: currentWeather.humidity+"%"
151- horizontalAlignment: Text.AlignLeft
152- font.pixelSize: FontUtils.sizeToPixels("large")
153- color: Theme.palette.normal.baseText
154- }
155- }
156-
157- Column {
158- id: precipitationColumn
159- anchors.left: currentCondition2.right
160- anchors.leftMargin: units.gu(3)
161- anchors.top: humidityColumn.bottom
162- anchors.topMargin: units.gu(2)
163- height: childrenRect.height
164- width: childrenRect.width
165-
166- Label {
167- id: precipitationLabel
168- text: i18n.tr("Precipitation")
169- horizontalAlignment: Text.AlignLeft
170- font.pixelSize: FontUtils.sizeToPixels("small")
171- color: Theme.palette.normal.baseText
172- }
173- Label {
174- id: precipitationValue
175- text: currentWeather.precipitation.toFixed(1)+" "+currentWeather.precipScale
176- horizontalAlignment: Text.AlignLeft
177- font.pixelSize: FontUtils.sizeToPixels("large")
178- color: Theme.palette.normal.baseText
179+ Column {
180+ id: leftColumn
181+ anchors {
182+ horizontalCenter: parent.horizontalCenter
183+ horizontalCenterOffset: units.gu(-16)
184+ verticalCenter: parent.verticalCenter
185+ }
186+ spacing: units.gu(1)
187+
188+ Components.WeatherDetailComponent {
189+ value: currentWeather.humidity
190+ measure: i18n.tr("Humidity")
191+ unit: i18n.tr('%')
192+ width: units.gu(15)
193+ }
194+
195+ Components.WeatherDetailComponent {
196+ value: currentWeather.windSpeed
197+ measure: i18n.tr("Wind speed")
198+ unit: currentWeather.speedScale + " " + currentWeather.windDir
199+ }
200+ }
201+
202+ Column {
203+ id: rightColumn
204+ anchors {
205+ horizontalCenter: parent.horizontalCenter
206+ horizontalCenterOffset: units.gu(0)
207+ verticalCenter: parent.verticalCenter
208+ }
209+ spacing: units.gu(1)
210+
211+ Components.WeatherDetailComponent {
212+ value: 1004
213+ measure: i18n.tr("Pressure")
214+ unit: i18n.tr("mbar")
215+ }
216+
217+ Components.WeatherDetailComponent {
218+ value: currentWeather.precipitation
219+ measure: i18n.tr("Precipitation")
220+ unit: currentWeather.precipScale
221 }
222 }
223 }
224
225 front:
226 Rectangle {
227+ color: "transparent"
228 anchors.fill: parent
229- color: "transparent"
230-
231- Components.WeatherConditionIconComponent {
232+
233+
234+ UbuntuShape {
235 id: currentCondition
236- width: units.gu(30)
237- height: units.gu(30)
238- anchors.horizontalCenter: parent.horizontalCenter
239- condition: currentWeather.icon
240-
241- NumberAnimation on opacity {
242- id: createAnimation
243- easing.type: Easing.Linear
244- from: 0
245- to: 1
246- duration: 1000
247- }
248-
249- Component.onCompleted: {
250- createAnimation.start()
251- }
252- }
253-
254- Rectangle {
255- id: rectangle1
256- width: units.gu(50)
257- height: units.gu(10)
258- anchors.horizontalCenter: parent.horizontalCenter
259- anchors.top: currentCondition.bottom
260- anchors.topMargin: 0
261- color: "transparent"
262-
263- Column {
264- id: column1
265- width: units.gu(5)
266- height: units.gu(5)
267- anchors.rightMargin: units.gu(2)
268- anchors.verticalCenter: parent.verticalCenter
269- anchors.right: tempCurrent.left
270- visible: showMaxTemp
271-
272- Label {
273- text: i18n.tr("Max.")
274- anchors.horizontalCenter: parent.horizontalCenter
275- font.pixelSize: FontUtils.sizeToPixels("small")
276- horizontalAlignment: Text.AlignHCenter
277- }
278-
279- Label {
280- id: tempMax
281- text: maxTemp+"°"+currentWeather.tempScale
282- anchors.horizontalCenter: parent.horizontalCenter
283- font.pixelSize: FontUtils.sizeToPixels("large")
284- horizontalAlignment: Text.AlignHCenter
285- color: Theme.palette.normal.baseText
286- }
287- }
288-
289- Text {
290- width: units.gu(17)
291- height: units.gu(10)
292- id: tempCurrent
293- objectName: "CurrentTempText"
294- text: currentTemp+String("°")+currentWeather.tempScale
295- style: Text.Normal
296- font.bold: false
297- font.family: "Ubuntu"
298- verticalAlignment: Text.AlignVCenter
299- anchors.horizontalCenter: parent.horizontalCenter
300- anchors.horizontalCenterOffset: (showMaxTemp) ? 0 : -units.gu(4)
301- anchors.verticalCenter: parent.verticalCenter
302- font.pointSize: 52
303- horizontalAlignment: Text.AlignHCenter
304- color: Theme.palette.normal.baseText
305- }
306-
307- Column {
308- id: column2
309- width: units.gu(5)
310- height: units.gu(5)
311- anchors.leftMargin: (showMaxTemp) ? units.gu(2) : units.gu(4)
312- anchors.verticalCenter: parent.verticalCenter
313- anchors.left: tempCurrent.right
314-
315- Label {
316- text: i18n.tr("Min.")
317- horizontalAlignment: Text.AlignHCenter
318- anchors.horizontalCenter: parent.horizontalCenter
319- font.pixelSize: FontUtils.sizeToPixels("small")
320- color: Theme.palette.normal.baseText
321- }
322-
323- Label {
324- id: tempMin
325- text: minTemp+"°"+currentWeather.tempScale
326- horizontalAlignment: Text.AlignHCenter
327- anchors.horizontalCenter: parent.horizontalCenter
328- font.pixelSize: FontUtils.sizeToPixels("large")
329- color: Theme.palette.normal.baseText
330- }
331- }
332- }
333- }
334+ color: "#20FFFFFF"
335+ radius: "medium"
336+
337+ width: units.gu(15)
338+ height: units.gu(15)
339+ anchors {
340+ horizontalCenter: parent.horizontalCenter
341+ horizontalCenterOffset: units.gu(-8)
342+ verticalCenter: parent.verticalCenter
343+ }
344+
345+ Components.WeatherConditionIconComponent {
346+
347+ anchors.fill: parent
348+ anchors.margins: units.gu(1)
349+ condition: currentWeather.icon
350+
351+ NumberAnimation on opacity {
352+ id: createAnimation
353+ easing.type: Easing.Linear
354+ from: 0
355+ to: 1
356+ duration: 1000
357+ }
358+
359+ Component.onCompleted: {
360+ createAnimation.start()
361+ }
362+ }
363+ }
364+
365+ Components.WeatherTemperatureComponent {
366+ currentTemp: currentWeather.currentTemp
367+ minTemp: currentWeather.minTemp
368+ maxTemp: currentWeather.maxTemp
369+
370+ anchors {
371+ horizontalCenter: parent.horizontalCenter
372+ horizontalCenterOffset: units.gu(8)
373+ verticalCenter: parent.verticalCenter
374+ }
375+ }
376+ }
377
378 transform: Rotation {
379 id: rotation
380
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+import QtQuick 2.0
386+import QtGraphicalEffects 1.0
387+import Ubuntu.Components 0.1
388+
389+UbuntuShape {
390+ id: infoComponent
391+ color: "#20FFFFFF"
392+ radius: "medium"
393+
394+ width: units.gu(15)
395+ height: units.gu(15)
396+ anchors {
397+ horizontalCenter: parent.horizontalCenter
398+ horizontalCenterOffset: units.gu(8)
399+ }
400+
401+ property real value: 99.99
402+ property string measure: "Wind speed"
403+ property string unit: "kmph SE"
404+
405+ Text {
406+ id: measure
407+ text: infoComponent.measure
408+ color: Theme.palette.normal.baseText
409+ style: Text.Raised
410+ font.bold: false
411+ font.family: "Ubuntu"
412+ font.pointSize: FontUtils.sizeToPixels("x-small") //9
413+ fontSizeMode: Text.Fit
414+ verticalAlignment: Text.AlignVCenter
415+ horizontalAlignment: Text.AlignHCenter
416+ anchors {
417+ left: parent.left
418+ leftMargin: units.gu(2)
419+ top: parent.top
420+ topMargin: units.gu(2)
421+ }
422+ }
423+
424+ Rectangle {
425+ id:line1
426+ color: "#55000000"
427+ anchors {
428+ top: measure.bottom
429+ topMargin: units.gu(0.5)
430+ left: parent.left
431+ leftMargin: units.gu(2)
432+ right: parent.right
433+ rightMargin: units.gu(2)
434+ }
435+ height: 1
436+ width: units.gu(10)
437+ }
438+ Rectangle {
439+ color: "#55FFFFFF"
440+ anchors {
441+ top: line1.bottom
442+ bottomMargin: 1
443+ left: line1.left
444+ right: line1.right
445+ }
446+ height: 1
447+ width: units.gu(10)
448+
449+ }
450+
451+ Text {
452+ id: value
453+ objectName: "CurrentTempText"
454+ text: infoComponent.value.toPrecision()
455+ color: Theme.palette.normal.baseText
456+ style: Text.Raised
457+ font.bold: false
458+ font.family: "Ubuntu"
459+ font.pointSize: FontUtils.sizeToPixels("x-large") //36
460+ fontSizeMode: Text.Fit
461+ verticalAlignment: Text.AlignVCenter
462+ horizontalAlignment: Text.AlignLeft
463+ anchors {
464+ verticalCenter: parent.verticalCenter
465+ left: parent.left
466+ leftMargin: units.gu(2)
467+ right: parent.right
468+ rightMargin: units.gu(2)
469+ }
470+ }
471+
472+ Rectangle {
473+ id: line2
474+ color: "#55000000"
475+ anchors {
476+ bottom: unit.top
477+ bottomMargin: units.gu(0.5)
478+ left: parent.left
479+ leftMargin: units.gu(2)
480+ right: parent.right
481+ rightMargin: units.gu(2)
482+ }
483+ height: 1
484+ width: units.gu(10)
485+
486+ }
487+ Rectangle {
488+ color: "#55FFFFFF"
489+ anchors {
490+ top: line2.bottom
491+ bottomMargin: 1
492+ left: line2.left
493+ right: line2.right
494+ }
495+ height: 1
496+ width: units.gu(10)
497+ }
498+
499+ Text {
500+ id: unit
501+ text: infoComponent.unit
502+ color: Theme.palette.normal.baseText
503+ style: Text.Raised
504+ font.bold: false
505+ font.family: "Ubuntu"
506+ font.pointSize: FontUtils.sizeToPixels("x-small") //9
507+ verticalAlignment: Text.AlignVCenter
508+ horizontalAlignment: Text.AlignHCenter
509+ anchors {
510+ bottom: parent.bottom
511+ bottomMargin: units.gu(2)
512+ left: parent.left
513+ leftMargin: units.gu(2)
514+ }
515+ }
516+}
517
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+import QtQuick 2.0
523+import QtGraphicalEffects 1.0
524+import Ubuntu.Components 0.1
525+
526+UbuntuShape {
527+ id: tempComponent
528+ color: "#20FFFFFF"
529+ radius: "medium"
530+
531+ width: units.gu(15)
532+ height: units.gu(15)
533+
534+ property int currentTemp: 27
535+ property int maxTemp: 35
536+ property int minTemp: 27
537+
538+ Text {
539+ id: value
540+ text: tempComponent.currentTemp
541+ color: Theme.palette.normal.baseText
542+ style: Text.Raised
543+ font.bold: false
544+ font.family: "Ubuntu"
545+ font.pointSize: 64 //FontUtils.sizeToPixels("x-large")
546+ font.letterSpacing: -2
547+ fontSizeMode: Text.Fit
548+ verticalAlignment: Text.AlignTop
549+ horizontalAlignment: Text.AlignRight
550+ height: units.gu(9)
551+ width: units.gu(9)
552+ anchors {
553+ top: parent.top
554+ topMargin: units.gu(1)
555+ left: parent.left
556+ leftMargin: units.gu(1)
557+ }
558+ }
559+ Text {
560+ id: currentTempScale
561+ text: String("°")
562+ style: Text.Raised
563+ font.bold: false
564+ font.family: "Ubuntu"
565+ font.pointSize: FontUtils.sizeToPixels("x-large") //32
566+ verticalAlignment: Text.AlignTop
567+ horizontalAlignment: Text.AlignLeft
568+ color: Theme.palette.normal.baseText
569+ height: units.gu(9)
570+ anchors {
571+ top: value.top
572+ topMargin: units.gu(0.5)
573+ left: value.right
574+ }
575+ }
576+
577+ Rectangle {
578+ id: line2
579+ color: "#55000000"
580+ anchors {
581+ top: value.bottom
582+ left: parent.left
583+ leftMargin: units.gu(2)
584+ right: parent.right
585+ rightMargin: units.gu(2)
586+ }
587+ height: 1
588+ width: units.gu(10)
589+
590+ }
591+ Rectangle {
592+ color: "#55FFFFFF"
593+ anchors {
594+ top: line2.bottom
595+ bottomMargin: 1
596+ left: line2.left
597+ right: line2.right
598+ }
599+ height: 1
600+ width: units.gu(10)
601+
602+ }
603+
604+
605+ Text {
606+ id: max
607+ text: i18n.tr("H: ")+tempComponent.maxTemp
608+ color: Theme.palette.normal.baseText
609+ style: Text.Raised
610+ font.bold: false
611+ font.family: "Ubuntu"
612+ font.pointSize: FontUtils.sizeToPixels("small")
613+ verticalAlignment: Text.AlignVCenter
614+ horizontalAlignment: Text.AlignHCenter
615+ anchors {
616+ bottom: parent.bottom
617+ bottomMargin: units.gu(2)
618+ left: parent.left
619+ leftMargin: units.gu(2)
620+ }
621+ }
622+
623+ Text {
624+ id: min
625+ text: i18n.tr("L: ")+tempComponent.minTemp
626+ color: Theme.palette.normal.baseText
627+ style: Text.Raised
628+ font.bold: false
629+ font.family: "Ubuntu"
630+ font.pointSize: FontUtils.sizeToPixels("small")
631+ fontSizeMode: Text.Fit
632+ verticalAlignment: Text.AlignVCenter
633+ horizontalAlignment: Text.AlignHCenter
634+ anchors {
635+ bottom: parent.bottom
636+ bottomMargin: units.gu(2)
637+ right: parent.right
638+ rightMargin: units.gu(2)
639+ }
640+ }
641+}
642
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 def _check_units(self, units):
648 """Checks selected units by values from the first location tab"""
649 current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText')
650- if units == "imperial":
651- self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F')))
652- self.assertThat(current_temps[2].text, Eventually(Equals(u'73°F')))
653+ if units == "imperial":
654+ self.assertThat(current_temps[0].text, Eventually(Equals(u'70')))
655+ self.assertThat(current_temps[1].text, Eventually(Equals(u'73')))
656 else:
657- self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C')))
658- self.assertThat(current_temps[2].text, Eventually(Equals(u'23°C')))
659+ self.assertThat(current_temps[0].text, Eventually(Equals(u'21')))
660+ self.assertThat(current_temps[1].text, Eventually(Equals(u'23')))
661
662 def test_switch_scale(self):
663 """Tests switching the scale in the settings"""

Subscribers

People subscribed via source and target branches