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
=== modified file 'components/CurrentWeather.qml'
--- components/CurrentWeather.qml 2013-08-05 18:53:33 +0000
+++ components/CurrentWeather.qml 2013-08-15 19:00:48 +0000
@@ -38,286 +38,103 @@
38 anchors.fill: parent38 anchors.fill: parent
39 color: "transparent"39 color: "transparent"
4040
41 Components.WeatherConditionIconComponent {41 Column {
42 id: currentCondition242 id: leftColumn
43 width: units.gu(20)43 anchors {
44 height: units.gu(20)44 horizontalCenter: parent.horizontalCenter
45 anchors.horizontalCenter: parent.horizontalCenter45 horizontalCenterOffset: units.gu(-16)
46 anchors.horizontalCenterOffset: units.gu(-6)46 verticalCenter: parent.verticalCenter
47 condition: currentWeather.icon47 }
4848 spacing: units.gu(1)
49 NumberAnimation on opacity {49
50 id: createAnimation250 Components.WeatherDetailComponent {
51 easing.type: Easing.Linear51 value: currentWeather.humidity
52 from: 052 measure: i18n.tr("Humidity")
53 to: 153 unit: i18n.tr('%')
54 duration: 100054 width: units.gu(15)
55 }55 }
5656
57 Component.onCompleted: {57 Components.WeatherDetailComponent {
58 createAnimation2.start()58 value: currentWeather.windSpeed
59 }59 measure: i18n.tr("Wind speed")
60 }60 unit: currentWeather.speedScale + " " + currentWeather.windDir
6161 }
62 Rectangle {62 }
63 id: rectangle1263
64 width: units.gu(50)64 Column {
65 height: units.gu(10)65 id: rightColumn
66 anchors.horizontalCenter: parent.horizontalCenter66 anchors {
67 anchors.top: currentCondition2.bottom67 horizontalCenter: parent.horizontalCenter
68 anchors.topMargin: 068 horizontalCenterOffset: units.gu(0)
69 color: "transparent"69 verticalCenter: parent.verticalCenter
7070 }
71 Column {71 spacing: units.gu(1)
72 id: column1272
73 width: units.gu(5)73 Components.WeatherDetailComponent {
74 height: units.gu(5)74 value: 1004
75 anchors.rightMargin: units.gu(2)75 measure: i18n.tr("Pressure")
76 anchors.verticalCenter: parent.verticalCenter76 unit: i18n.tr("mbar")
77 anchors.right: tempCurrent2.left77 }
78 visible: showMaxTemp78
7979 Components.WeatherDetailComponent {
80 Label {80 value: currentWeather.precipitation
81 text: i18n.tr("Max.")81 measure: i18n.tr("Precipitation")
82 anchors.horizontalCenter: parent.horizontalCenter82 unit: currentWeather.precipScale
83 font.pixelSize: FontUtils.sizeToPixels("small")
84 horizontalAlignment: Text.AlignHCenter
85 }
86
87 Label {
88 id: tempMax2
89 text: maxTemp+"°"+currentWeather.tempScale
90 anchors.horizontalCenter: parent.horizontalCenter
91 font.pixelSize: FontUtils.sizeToPixels("large")
92 horizontalAlignment: Text.AlignHCenter
93 color: Theme.palette.normal.baseText
94 }
95 }
96
97 Text {
98 width: units.gu(17)
99 height: units.gu(10)
100 id: tempCurrent2
101 objectName: "CurrentTempText"
102 text: currentTemp+String("°")+currentWeather.tempScale
103 style: Text.Normal
104 font.bold: false
105 font.family: "Ubuntu"
106 verticalAlignment: Text.AlignVCenter
107 anchors.horizontalCenter: parent.horizontalCenter
108 anchors.horizontalCenterOffset: (showMaxTemp) ? 0 : -units.gu(4)
109 anchors.verticalCenter: parent.verticalCenter
110 font.pointSize: 52
111 horizontalAlignment: Text.AlignHCenter
112 color: Theme.palette.normal.baseText
113 }
114
115 Column {
116 id: column22
117 width: units.gu(5)
118 height: units.gu(5)
119 anchors.leftMargin: (showMaxTemp) ? units.gu(2) : units.gu(4)
120 anchors.verticalCenter: parent.verticalCenter
121 anchors.left: tempCurrent2.right
122
123 Label {
124 text: i18n.tr("Min.")
125 horizontalAlignment: Text.AlignHCenter
126 anchors.horizontalCenter: parent.horizontalCenter
127 font.pixelSize: FontUtils.sizeToPixels("small")
128 color: Theme.palette.normal.baseText
129 }
130
131 Label {
132 id: tempMin2
133 text: minTemp+"°"+currentWeather.tempScale
134 horizontalAlignment: Text.AlignHCenter
135 anchors.horizontalCenter: parent.horizontalCenter
136 font.pixelSize: FontUtils.sizeToPixels("large")
137 color: Theme.palette.normal.baseText
138 }
139 }
140 }
141
142 Column {
143 id: windColumn
144 anchors.left: currentCondition2.right
145 anchors.leftMargin: units.gu(3)
146 height: childrenRect.height
147 width: childrenRect.width
148
149 Label {
150 id: windLabel
151 text: i18n.tr("Wind")
152 horizontalAlignment: Text.AlignLeft
153 font.pixelSize: FontUtils.sizeToPixels("small")
154 color: Theme.palette.normal.baseText
155 }
156 Label {
157 id: windValue
158 text: currentWeather.windSpeed+" "+currentWeather.speedScale+" "+currentWeather.windDir
159 horizontalAlignment: Text.AlignLeft
160 font.pixelSize: FontUtils.sizeToPixels("large")
161 color: Theme.palette.normal.baseText
162 }
163 }
164
165 Column {
166 id: humidityColumn
167 anchors.left: currentCondition2.right
168 anchors.leftMargin: units.gu(3)
169 anchors.top: windColumn.bottom
170 anchors.topMargin: units.gu(2)
171 height: childrenRect.height
172 width: childrenRect.width
173
174 Label {
175 id: humidityLabel
176 text: i18n.tr("Humidity")
177 horizontalAlignment: Text.AlignLeft
178 font.pixelSize: FontUtils.sizeToPixels("small")
179 color: Theme.palette.normal.baseText
180 }
181 Label {
182 id: humidityValue
183 text: currentWeather.humidity+"%"
184 horizontalAlignment: Text.AlignLeft
185 font.pixelSize: FontUtils.sizeToPixels("large")
186 color: Theme.palette.normal.baseText
187 }
188 }
189
190 Column {
191 id: precipitationColumn
192 anchors.left: currentCondition2.right
193 anchors.leftMargin: units.gu(3)
194 anchors.top: humidityColumn.bottom
195 anchors.topMargin: units.gu(2)
196 height: childrenRect.height
197 width: childrenRect.width
198
199 Label {
200 id: precipitationLabel
201 text: i18n.tr("Precipitation")
202 horizontalAlignment: Text.AlignLeft
203 font.pixelSize: FontUtils.sizeToPixels("small")
204 color: Theme.palette.normal.baseText
205 }
206 Label {
207 id: precipitationValue
208 text: currentWeather.precipitation.toFixed(1)+" "+currentWeather.precipScale
209 horizontalAlignment: Text.AlignLeft
210 font.pixelSize: FontUtils.sizeToPixels("large")
211 color: Theme.palette.normal.baseText
212 }83 }
213 }84 }
214 }85 }
21586
216 front:87 front:
217 Rectangle {88 Rectangle {
89 color: "transparent"
218 anchors.fill: parent90 anchors.fill: parent
219 color: "transparent"91
22092
221 Components.WeatherConditionIconComponent {93 UbuntuShape {
222 id: currentCondition94 id: currentCondition
223 width: units.gu(30)95 color: "#20FFFFFF"
224 height: units.gu(30)96 radius: "medium"
225 anchors.horizontalCenter: parent.horizontalCenter97
226 condition: currentWeather.icon98 width: units.gu(15)
22799 height: units.gu(15)
228 NumberAnimation on opacity {100 anchors {
229 id: createAnimation101 horizontalCenter: parent.horizontalCenter
230 easing.type: Easing.Linear102 horizontalCenterOffset: units.gu(-8)
231 from: 0103 verticalCenter: parent.verticalCenter
232 to: 1104 }
233 duration: 1000105
234 }106 Components.WeatherConditionIconComponent {
235107
236 Component.onCompleted: {108 anchors.fill: parent
237 createAnimation.start()109 anchors.margins: units.gu(1)
238 }110 condition: currentWeather.icon
239 }111
240112 NumberAnimation on opacity {
241 Rectangle {113 id: createAnimation
242 id: rectangle1114 easing.type: Easing.Linear
243 width: units.gu(50)115 from: 0
244 height: units.gu(10)116 to: 1
245 anchors.horizontalCenter: parent.horizontalCenter117 duration: 1000
246 anchors.top: currentCondition.bottom118 }
247 anchors.topMargin: 0119
248 color: "transparent"120 Component.onCompleted: {
249121 createAnimation.start()
250 Column {122 }
251 id: column1123 }
252 width: units.gu(5)124 }
253 height: units.gu(5)125
254 anchors.rightMargin: units.gu(2)126 Components.WeatherTemperatureComponent {
255 anchors.verticalCenter: parent.verticalCenter127 currentTemp: currentWeather.currentTemp
256 anchors.right: tempCurrent.left128 minTemp: currentWeather.minTemp
257 visible: showMaxTemp129 maxTemp: currentWeather.maxTemp
258130
259 Label {131 anchors {
260 text: i18n.tr("Max.")132 horizontalCenter: parent.horizontalCenter
261 anchors.horizontalCenter: parent.horizontalCenter133 horizontalCenterOffset: units.gu(8)
262 font.pixelSize: FontUtils.sizeToPixels("small")134 verticalCenter: parent.verticalCenter
263 horizontalAlignment: Text.AlignHCenter135 }
264 }136 }
265137 }
266 Label {
267 id: tempMax
268 text: maxTemp+"°"+currentWeather.tempScale
269 anchors.horizontalCenter: parent.horizontalCenter
270 font.pixelSize: FontUtils.sizeToPixels("large")
271 horizontalAlignment: Text.AlignHCenter
272 color: Theme.palette.normal.baseText
273 }
274 }
275
276 Text {
277 width: units.gu(17)
278 height: units.gu(10)
279 id: tempCurrent
280 objectName: "CurrentTempText"
281 text: currentTemp+String("°")+currentWeather.tempScale
282 style: Text.Normal
283 font.bold: false
284 font.family: "Ubuntu"
285 verticalAlignment: Text.AlignVCenter
286 anchors.horizontalCenter: parent.horizontalCenter
287 anchors.horizontalCenterOffset: (showMaxTemp) ? 0 : -units.gu(4)
288 anchors.verticalCenter: parent.verticalCenter
289 font.pointSize: 52
290 horizontalAlignment: Text.AlignHCenter
291 color: Theme.palette.normal.baseText
292 }
293
294 Column {
295 id: column2
296 width: units.gu(5)
297 height: units.gu(5)
298 anchors.leftMargin: (showMaxTemp) ? units.gu(2) : units.gu(4)
299 anchors.verticalCenter: parent.verticalCenter
300 anchors.left: tempCurrent.right
301
302 Label {
303 text: i18n.tr("Min.")
304 horizontalAlignment: Text.AlignHCenter
305 anchors.horizontalCenter: parent.horizontalCenter
306 font.pixelSize: FontUtils.sizeToPixels("small")
307 color: Theme.palette.normal.baseText
308 }
309
310 Label {
311 id: tempMin
312 text: minTemp+"°"+currentWeather.tempScale
313 horizontalAlignment: Text.AlignHCenter
314 anchors.horizontalCenter: parent.horizontalCenter
315 font.pixelSize: FontUtils.sizeToPixels("large")
316 color: Theme.palette.normal.baseText
317 }
318 }
319 }
320 }
321138
322 transform: Rotation {139 transform: Rotation {
323 id: rotation140 id: rotation
324141
=== added file 'components/WeatherDetailComponent.qml'
--- components/WeatherDetailComponent.qml 1970-01-01 00:00:00 +0000
+++ components/WeatherDetailComponent.qml 2013-08-15 19:00:48 +0000
@@ -0,0 +1,132 @@
1import QtQuick 2.0
2import QtGraphicalEffects 1.0
3import Ubuntu.Components 0.1
4
5UbuntuShape {
6 id: infoComponent
7 color: "#20FFFFFF"
8 radius: "medium"
9
10 width: units.gu(15)
11 height: units.gu(15)
12 anchors {
13 horizontalCenter: parent.horizontalCenter
14 horizontalCenterOffset: units.gu(8)
15 }
16
17 property real value: 99.99
18 property string measure: "Wind speed"
19 property string unit: "kmph SE"
20
21 Text {
22 id: measure
23 text: infoComponent.measure
24 color: Theme.palette.normal.baseText
25 style: Text.Raised
26 font.bold: false
27 font.family: "Ubuntu"
28 font.pointSize: FontUtils.sizeToPixels("x-small") //9
29 fontSizeMode: Text.Fit
30 verticalAlignment: Text.AlignVCenter
31 horizontalAlignment: Text.AlignHCenter
32 anchors {
33 left: parent.left
34 leftMargin: units.gu(2)
35 top: parent.top
36 topMargin: units.gu(2)
37 }
38 }
39
40 Rectangle {
41 id:line1
42 color: "#55000000"
43 anchors {
44 top: measure.bottom
45 topMargin: units.gu(0.5)
46 left: parent.left
47 leftMargin: units.gu(2)
48 right: parent.right
49 rightMargin: units.gu(2)
50 }
51 height: 1
52 width: units.gu(10)
53 }
54 Rectangle {
55 color: "#55FFFFFF"
56 anchors {
57 top: line1.bottom
58 bottomMargin: 1
59 left: line1.left
60 right: line1.right
61 }
62 height: 1
63 width: units.gu(10)
64
65 }
66
67 Text {
68 id: value
69 objectName: "CurrentTempText"
70 text: infoComponent.value.toPrecision()
71 color: Theme.palette.normal.baseText
72 style: Text.Raised
73 font.bold: false
74 font.family: "Ubuntu"
75 font.pointSize: FontUtils.sizeToPixels("x-large") //36
76 fontSizeMode: Text.Fit
77 verticalAlignment: Text.AlignVCenter
78 horizontalAlignment: Text.AlignLeft
79 anchors {
80 verticalCenter: parent.verticalCenter
81 left: parent.left
82 leftMargin: units.gu(2)
83 right: parent.right
84 rightMargin: units.gu(2)
85 }
86 }
87
88 Rectangle {
89 id: line2
90 color: "#55000000"
91 anchors {
92 bottom: unit.top
93 bottomMargin: units.gu(0.5)
94 left: parent.left
95 leftMargin: units.gu(2)
96 right: parent.right
97 rightMargin: units.gu(2)
98 }
99 height: 1
100 width: units.gu(10)
101
102 }
103 Rectangle {
104 color: "#55FFFFFF"
105 anchors {
106 top: line2.bottom
107 bottomMargin: 1
108 left: line2.left
109 right: line2.right
110 }
111 height: 1
112 width: units.gu(10)
113 }
114
115 Text {
116 id: unit
117 text: infoComponent.unit
118 color: Theme.palette.normal.baseText
119 style: Text.Raised
120 font.bold: false
121 font.family: "Ubuntu"
122 font.pointSize: FontUtils.sizeToPixels("x-small") //9
123 verticalAlignment: Text.AlignVCenter
124 horizontalAlignment: Text.AlignHCenter
125 anchors {
126 bottom: parent.bottom
127 bottomMargin: units.gu(2)
128 left: parent.left
129 leftMargin: units.gu(2)
130 }
131 }
132}
0133
=== added file 'components/WeatherTemperatureComponent.qml'
--- components/WeatherTemperatureComponent.qml 1970-01-01 00:00:00 +0000
+++ components/WeatherTemperatureComponent.qml 2013-08-15 19:00:48 +0000
@@ -0,0 +1,120 @@
1import QtQuick 2.0
2import QtGraphicalEffects 1.0
3import Ubuntu.Components 0.1
4
5UbuntuShape {
6 id: tempComponent
7 color: "#20FFFFFF"
8 radius: "medium"
9
10 width: units.gu(15)
11 height: units.gu(15)
12
13 property int currentTemp: 27
14 property int maxTemp: 35
15 property int minTemp: 27
16
17 Text {
18 id: value
19 text: tempComponent.currentTemp
20 color: Theme.palette.normal.baseText
21 style: Text.Raised
22 font.bold: false
23 font.family: "Ubuntu"
24 font.pointSize: 64 //FontUtils.sizeToPixels("x-large")
25 font.letterSpacing: -2
26 fontSizeMode: Text.Fit
27 verticalAlignment: Text.AlignTop
28 horizontalAlignment: Text.AlignRight
29 height: units.gu(9)
30 width: units.gu(9)
31 anchors {
32 top: parent.top
33 topMargin: units.gu(1)
34 left: parent.left
35 leftMargin: units.gu(1)
36 }
37 }
38 Text {
39 id: currentTempScale
40 text: String("°")
41 style: Text.Raised
42 font.bold: false
43 font.family: "Ubuntu"
44 font.pointSize: FontUtils.sizeToPixels("x-large") //32
45 verticalAlignment: Text.AlignTop
46 horizontalAlignment: Text.AlignLeft
47 color: Theme.palette.normal.baseText
48 height: units.gu(9)
49 anchors {
50 top: value.top
51 topMargin: units.gu(0.5)
52 left: value.right
53 }
54 }
55
56 Rectangle {
57 id: line2
58 color: "#55000000"
59 anchors {
60 top: value.bottom
61 left: parent.left
62 leftMargin: units.gu(2)
63 right: parent.right
64 rightMargin: units.gu(2)
65 }
66 height: 1
67 width: units.gu(10)
68
69 }
70 Rectangle {
71 color: "#55FFFFFF"
72 anchors {
73 top: line2.bottom
74 bottomMargin: 1
75 left: line2.left
76 right: line2.right
77 }
78 height: 1
79 width: units.gu(10)
80
81 }
82
83
84 Text {
85 id: max
86 text: i18n.tr("H: ")+tempComponent.maxTemp
87 color: Theme.palette.normal.baseText
88 style: Text.Raised
89 font.bold: false
90 font.family: "Ubuntu"
91 font.pointSize: FontUtils.sizeToPixels("small")
92 verticalAlignment: Text.AlignVCenter
93 horizontalAlignment: Text.AlignHCenter
94 anchors {
95 bottom: parent.bottom
96 bottomMargin: units.gu(2)
97 left: parent.left
98 leftMargin: units.gu(2)
99 }
100 }
101
102 Text {
103 id: min
104 text: i18n.tr("L: ")+tempComponent.minTemp
105 color: Theme.palette.normal.baseText
106 style: Text.Raised
107 font.bold: false
108 font.family: "Ubuntu"
109 font.pointSize: FontUtils.sizeToPixels("small")
110 fontSizeMode: Text.Fit
111 verticalAlignment: Text.AlignVCenter
112 horizontalAlignment: Text.AlignHCenter
113 anchors {
114 bottom: parent.bottom
115 bottomMargin: units.gu(2)
116 right: parent.right
117 rightMargin: units.gu(2)
118 }
119 }
120}
0121
=== modified file 'tests/autopilot/ubuntu_weather_app/tests/test_settings.py'
--- tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-14 20:28:56 +0000
+++ tests/autopilot/ubuntu_weather_app/tests/test_settings.py 2013-08-15 19:00:48 +0000
@@ -37,12 +37,12 @@
37 def _check_units(self, units):37 def _check_units(self, units):
38 """Checks selected units by values from the first location tab"""38 """Checks selected units by values from the first location tab"""
39 current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText')39 current_temps = self.main_window.get_objects('QQuickText', 'CurrentTempText')
40 if units == "imperial":40 if units == "imperial":
41 self.assertThat(current_temps[0].text, Eventually(Equals(u'70°F')))41 self.assertThat(current_temps[0].text, Eventually(Equals(u'70')))
42 self.assertThat(current_temps[2].text, Eventually(Equals(u'73°F')))42 self.assertThat(current_temps[1].text, Eventually(Equals(u'73')))
43 else:43 else:
44 self.assertThat(current_temps[0].text, Eventually(Equals(u'21°C')))44 self.assertThat(current_temps[0].text, Eventually(Equals(u'21')))
45 self.assertThat(current_temps[2].text, Eventually(Equals(u'23°C')))45 self.assertThat(current_temps[1].text, Eventually(Equals(u'23')))
4646
47 def test_switch_scale(self):47 def test_switch_scale(self):
48 """Tests switching the scale in the settings"""48 """Tests switching the scale in the settings"""

Subscribers

People subscribed via source and target branches