Merge lp:~dpm/ubuntu-weather-app/fix-nexus7 into lp:ubuntu-weather-app/obsolete.trunk
- fix-nexus7
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Martin Borho |
Approved revision: | 201 |
Merged at revision: | 205 |
Proposed branch: | lp:~dpm/ubuntu-weather-app/fix-nexus7 |
Merge into: | lp:ubuntu-weather-app/obsolete.trunk |
Diff against target: |
529 lines (+264/-119) 6 files modified
CMakeLists.txt (+4/-3) com.ubuntu.weather_weather.desktop.in.in (+0/-1) components/CurrentWeather.qml (+14/-6) components/CurrentWeatherFront.qml (+5/-1) components/WeatherConditionIconComponent.qml (+4/-2) components/WeatherTemperatureComponent.qml (+237/-106) |
To merge this branch: | bzr merge lp:~dpm/ubuntu-weather-app/fix-nexus7 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Borho | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+207325@code.launchpad.net |
Commit message
Removes SideStage hint, fixes related to the sizes of the current weather data display on tablets
Description of the change
This branch includes 3 fixes:
- Raúl Yeguas' work to resize the UbuntuShapes on the current weather view to fit on a Nexus 7
- Removal of the sidestage hint on the desktop file so that Weather loads in tablet mode on the N7 and N10
- Enables a semi-tablet mode for N7, where the current weather boxes work in phone mode
This can be tested directly from this click package: http://
On a Nexus 10:
http://
On a Nexus 7:
http://
Known issues:
- Current weather boxes not vertically centered on the N7
- Weather data provider toolbar is a bit off on the N7
- Sometimes the H temperature is not shown (see N10 screenshot above)
- Discovered a crash [1] on the N7. It might need a wipe of the DB to reproduce it
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : | # |
Martin Borho (martin-borho) wrote : | # |
\o/
Preview Diff
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2014-02-18 21:26:36 +0000 | |||
3 | +++ CMakeLists.txt 2014-02-19 23:50:23 +0000 | |||
4 | @@ -12,7 +12,7 @@ | |||
5 | 12 | set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher") | 12 | set(URLS_FILE "${PROJECT_NAME}_${APP_NAME}.url-dispatcher") |
6 | 13 | set(APP_HARDCODE ubuntu-weather-app) | 13 | set(APP_HARDCODE ubuntu-weather-app) |
7 | 14 | set(MAIN_QML ubuntu-weather-app.qml) | 14 | set(MAIN_QML ubuntu-weather-app.qml) |
9 | 15 | set(ICON weather-app@30.png) | 15 | set(ICON_FILE weather-app@30.png) |
10 | 16 | set(AUTOPILOT_DIR ubuntu_weather_app) | 16 | set(AUTOPILOT_DIR ubuntu_weather_app) |
11 | 17 | 17 | ||
12 | 18 | if(CLICK_MODE) | 18 | if(CLICK_MODE) |
13 | @@ -23,13 +23,14 @@ | |||
14 | 23 | set(CMAKE_INSTALL_PREFIX /) | 23 | set(CMAKE_INSTALL_PREFIX /) |
15 | 24 | set(CMAKE_INSTALL_BINDIR /) | 24 | set(CMAKE_INSTALL_BINDIR /) |
16 | 25 | set(DATA_DIR /) | 25 | set(DATA_DIR /) |
17 | 26 | set(ICON ${ICON_FILE}) | ||
18 | 26 | set(EXEC "qmlscene ${MAIN_QML}") | 27 | set(EXEC "qmlscene ${MAIN_QML}") |
19 | 27 | set(DESKTOP_DIR ${DATA_DIR}) | 28 | set(DESKTOP_DIR ${DATA_DIR}) |
20 | 28 | set(URLS_DIR ${DATA_DIR}) | 29 | set(URLS_DIR ${DATA_DIR}) |
21 | 29 | else(CLICK_MODE) | 30 | else(CLICK_MODE) |
22 | 30 | set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE}) | 31 | set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_HARDCODE}) |
23 | 31 | set(EXEC ${APP_HARDCODE}) | 32 | set(EXEC ${APP_HARDCODE}) |
25 | 32 | set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON}) | 33 | set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE}) |
26 | 33 | configure_file(${APP_HARDCODE}.in | 34 | configure_file(${APP_HARDCODE}.in |
27 | 34 | ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}) | 35 | ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE}) |
28 | 35 | install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE} | 36 | install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_HARDCODE} |
29 | @@ -48,7 +49,7 @@ | |||
30 | 48 | *.qml *.js *.png *.js) | 49 | *.qml *.js *.png *.js) |
31 | 49 | install(DIRECTORY components resources DESTINATION ${DATA_DIR}) | 50 | install(DIRECTORY components resources DESTINATION ${DATA_DIR}) |
32 | 50 | install(FILES key.js DESTINATION ${DATA_DIR}) | 51 | install(FILES key.js DESTINATION ${DATA_DIR}) |
34 | 51 | install(FILES ${MAIN_QML} DESTINATION ${DATA_DIR}) | 52 | install(FILES ${MAIN_QML} ${ICON_FILE} DESTINATION ${DATA_DIR}) |
35 | 52 | 53 | ||
36 | 53 | configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in @ONLY) | 54 | configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in @ONLY) |
37 | 54 | file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}) | 55 | file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}) |
38 | 55 | 56 | ||
39 | === modified file 'com.ubuntu.weather_weather.desktop.in.in' | |||
40 | --- com.ubuntu.weather_weather.desktop.in.in 2014-02-14 09:04:01 +0000 | |||
41 | +++ com.ubuntu.weather_weather.desktop.in.in 2014-02-19 23:50:23 +0000 | |||
42 | @@ -6,5 +6,4 @@ | |||
43 | 6 | Icon=@ICON@ | 6 | Icon=@ICON@ |
44 | 7 | Name=tr("Weather") | 7 | Name=tr("Weather") |
45 | 8 | X-Ubuntu-Touch=true | 8 | X-Ubuntu-Touch=true |
46 | 9 | X-Ubuntu-StageHint=SideStage | ||
47 | 10 | X-Ubuntu-Gettext-Domain=@PROJECT_NAME@ | 9 | X-Ubuntu-Gettext-Domain=@PROJECT_NAME@ |
48 | 11 | 10 | ||
49 | === modified file 'components/CurrentWeather.qml' | |||
50 | --- components/CurrentWeather.qml 2014-02-18 17:55:17 +0000 | |||
51 | +++ components/CurrentWeather.qml 2014-02-19 23:50:23 +0000 | |||
52 | @@ -43,6 +43,13 @@ | |||
53 | 43 | property string tempScale: (mainView.settings["units"] === "imperial") ? "F" : "C" | 43 | property string tempScale: (mainView.settings["units"] === "imperial") ? "F" : "C" |
54 | 44 | property string speedScale: (mainView.settings["wind_units"] === "mph") ? "mph" : "km/h" | 44 | property string speedScale: (mainView.settings["wind_units"] === "mph") ? "mph" : "km/h" |
55 | 45 | property string precipScale: (mainView.settings["precip_units"] === "in") ? "in" : "mm" | 45 | property string precipScale: (mainView.settings["precip_units"] === "in") ? "in" : "mm" |
56 | 46 | // Note that this should actually be a phone width, but since | ||
57 | 47 | // the tablet layout is not yet working well on a N7, we | ||
58 | 48 | // set the width to trigger this layout to be higher than that | ||
59 | 49 | // of a N7, so that on that device it will still be in phone | ||
60 | 50 | // mode | ||
61 | 51 | // Nexus 7's width is 1920px/21px/GU = 91.43 GU | ||
62 | 52 | property real wideModeThreshold: units.gu(95) | ||
63 | 46 | 53 | ||
64 | 47 | property NumberAnimation appearAnimation: frontrect.conditionIcon.appearAnimation | 54 | property NumberAnimation appearAnimation: frontrect.conditionIcon.appearAnimation |
65 | 48 | 55 | ||
66 | @@ -85,13 +92,13 @@ | |||
67 | 85 | layouts: [ | 92 | layouts: [ |
68 | 86 | ConditionalLayout { | 93 | ConditionalLayout { |
69 | 87 | name: "WeatherItem" | 94 | name: "WeatherItem" |
71 | 88 | when: layouts.width > units.gu(80) | 95 | when: layouts.width > wideModeThreshold |
72 | 89 | Rectangle { | 96 | Rectangle { |
73 | 90 | color: "transparent" | 97 | color: "transparent" |
74 | 91 | anchors.fill: parent | 98 | anchors.fill: parent |
75 | 92 | CurrentWeatherFront { | 99 | CurrentWeatherFront { |
76 | 93 | id: frontrect | 100 | id: frontrect |
78 | 94 | shapeSize: units.gu(18) | 101 | viewMode: 1 |
79 | 95 | anchors { | 102 | anchors { |
80 | 96 | horizontalCenter: parent.horizontalCenter | 103 | horizontalCenter: parent.horizontalCenter |
81 | 97 | verticalCenter: parent.verticalCenter | 104 | verticalCenter: parent.verticalCenter |
82 | @@ -104,9 +111,9 @@ | |||
83 | 104 | shapeSize: units.gu(14) | 111 | shapeSize: units.gu(14) |
84 | 105 | gridColumns: 4 | 112 | gridColumns: 4 |
85 | 106 | anchors { | 113 | anchors { |
86 | 114 | top: frontrect.bottom | ||
87 | 115 | topMargin: units.gu(7) | ||
88 | 107 | horizontalCenter: parent.horizontalCenter | 116 | horizontalCenter: parent.horizontalCenter |
89 | 108 | verticalCenter: parent.verticalCenter | ||
90 | 109 | verticalCenterOffset: (parent.height*0.2); | ||
91 | 110 | } | 117 | } |
92 | 111 | } | 118 | } |
93 | 112 | Components.ScrollingArea {} | 119 | Components.ScrollingArea {} |
94 | @@ -133,16 +140,17 @@ | |||
95 | 133 | id: frontrect | 140 | id: frontrect |
96 | 134 | anchors.fill: parent | 141 | anchors.fill: parent |
97 | 135 | Layouts.item: "front" | 142 | Layouts.item: "front" |
98 | 143 | viewMode: 0 | ||
99 | 136 | } | 144 | } |
100 | 137 | 145 | ||
101 | 138 | states:[ | 146 | states:[ |
102 | 139 | State { | 147 | State { |
103 | 140 | name: "back" | 148 | name: "back" |
105 | 141 | when: flipable.flipped && layouts.width < units.gu(80) | 149 | when: flipable.flipped && layouts.width < wideModeThreshold |
106 | 142 | }, | 150 | }, |
107 | 143 | State { | 151 | State { |
108 | 144 | name: "front" | 152 | name: "front" |
110 | 145 | when: !flipable.flipped && layouts.width < units.gu(80) | 153 | when: !flipable.flipped && layouts.width < wideModeThreshold |
111 | 146 | } | 154 | } |
112 | 147 | ] | 155 | ] |
113 | 148 | 156 | ||
114 | 149 | 157 | ||
115 | === modified file 'components/CurrentWeatherFront.qml' | |||
116 | --- components/CurrentWeatherFront.qml 2014-02-15 16:04:16 +0000 | |||
117 | +++ components/CurrentWeatherFront.qml 2014-02-19 23:50:23 +0000 | |||
118 | @@ -29,7 +29,8 @@ | |||
119 | 29 | property alias conditionIcon: currentConditionIcon | 29 | property alias conditionIcon: currentConditionIcon |
120 | 30 | property alias conditionTempContent: currentConditionTempContent | 30 | property alias conditionTempContent: currentConditionTempContent |
121 | 31 | property alias conditionTemp: currentConditionTemp | 31 | property alias conditionTemp: currentConditionTemp |
123 | 32 | property int shapeSize: units.gu(15) | 32 | property int shapeSize: (viewMode == 0) ? units.gu(15) : units.gu(28) |
124 | 33 | property int viewMode // 0: Mobile, 1: Tablet | ||
125 | 33 | 34 | ||
126 | 34 | UbuntuShape { | 35 | UbuntuShape { |
127 | 35 | id: currentCondition | 36 | id: currentCondition |
128 | @@ -49,6 +50,7 @@ | |||
129 | 49 | anchors.centerIn: parent | 50 | anchors.centerIn: parent |
130 | 50 | anchors.margins: units.gu(1) | 51 | anchors.margins: units.gu(1) |
131 | 51 | condition: currentWeather.icon | 52 | condition: currentWeather.icon |
132 | 53 | viewMode: frontrect.viewMode | ||
133 | 52 | } | 54 | } |
134 | 53 | } | 55 | } |
135 | 54 | 56 | ||
136 | @@ -71,6 +73,8 @@ | |||
137 | 71 | minTemp: Math.round(currentWeather.minTemp) | 73 | minTemp: Math.round(currentWeather.minTemp) |
138 | 72 | maxTemp: Math.round(currentWeather.maxTemp) | 74 | maxTemp: Math.round(currentWeather.maxTemp) |
139 | 73 | anchors.fill: parent | 75 | anchors.fill: parent |
140 | 76 | |||
141 | 77 | viewMode: frontrect.viewMode | ||
142 | 74 | } | 78 | } |
143 | 75 | } | 79 | } |
144 | 76 | } | 80 | } |
145 | 77 | 81 | ||
146 | === modified file 'components/WeatherConditionIconComponent.qml' | |||
147 | --- components/WeatherConditionIconComponent.qml 2014-01-28 10:04:42 +0000 | |||
148 | +++ components/WeatherConditionIconComponent.qml 2014-02-19 23:50:23 +0000 | |||
149 | @@ -15,6 +15,8 @@ | |||
150 | 15 | property int totalImage: 50 | 15 | property int totalImage: 50 |
151 | 16 | property NumberAnimation appearAnimation : appear | 16 | property NumberAnimation appearAnimation : appear |
152 | 17 | 17 | ||
153 | 18 | property int viewMode // 0: mobile, 1: tablet | ||
154 | 19 | |||
155 | 18 | /* temporary icon map */ | 20 | /* temporary icon map */ |
156 | 19 | property var conditionicon: { | 21 | property var conditionicon: { |
157 | 20 | "clear_day": "02", | 22 | "clear_day": "02", |
158 | @@ -45,8 +47,8 @@ | |||
159 | 45 | id: icon | 47 | id: icon |
160 | 46 | anchors.centerIn: parent | 48 | anchors.centerIn: parent |
161 | 47 | source: "../resources/images/"+conditionicon[condition]+"/"+currentImage+".png" | 49 | source: "../resources/images/"+conditionicon[condition]+"/"+currentImage+".png" |
164 | 48 | height: units.gu(18) | 50 | height: (viewMode == 0) ? units.gu(18) : units.gu(30) |
165 | 49 | width: units.gu(18) | 51 | width: (viewMode == 0) ? units.gu(18) : units.gu(30) |
166 | 50 | } | 52 | } |
167 | 51 | 53 | ||
168 | 52 | NumberAnimation { | 54 | NumberAnimation { |
169 | 53 | 55 | ||
170 | === modified file 'components/WeatherTemperatureComponent.qml' | |||
171 | --- components/WeatherTemperatureComponent.qml 2014-01-22 22:02:58 +0000 | |||
172 | +++ components/WeatherTemperatureComponent.qml 2014-02-19 23:50:23 +0000 | |||
173 | @@ -18,6 +18,7 @@ | |||
174 | 18 | import QtQuick 2.0 | 18 | import QtQuick 2.0 |
175 | 19 | import QtGraphicalEffects 1.0 | 19 | import QtGraphicalEffects 1.0 |
176 | 20 | import Ubuntu.Components 0.1 | 20 | import Ubuntu.Components 0.1 |
177 | 21 | import Ubuntu.Layouts 0.1 | ||
178 | 21 | 22 | ||
179 | 22 | Rectangle { | 23 | Rectangle { |
180 | 23 | id: tempComponent | 24 | id: tempComponent |
181 | @@ -28,112 +29,242 @@ | |||
182 | 28 | property int maxTemp | 29 | property int maxTemp |
183 | 29 | property int minTemp | 30 | property int minTemp |
184 | 30 | 31 | ||
291 | 31 | Text { | 32 | property int viewMode // 0: Mobile, 1: Tablet |
292 | 32 | id: value | 33 | |
293 | 33 | objectName: "CurrentTempText" | 34 | Layouts { |
294 | 34 | text: tempComponent.currentTemp | 35 | objectName: "WeatherTemperatureLayout" |
295 | 35 | color: Theme.palette.normal.baseText | 36 | id: layoutsCurrentTemp |
296 | 36 | style: Text.Raised | 37 | |
297 | 37 | font.bold: false | 38 | anchors.fill: parent |
298 | 38 | font.family: "Ubuntu" | 39 | |
299 | 39 | font.pointSize: units.gu(9) //FontUtils.sizeToPixels("xx-large") | 40 | /*layouts: [ |
300 | 40 | font.letterSpacing: -2 | 41 | ConditionalLayout { |
301 | 41 | fontSizeMode: Text.Fit | 42 | name: "WeatherTempItem" |
302 | 42 | verticalAlignment: Text.AlignTop | 43 | when: layouts.width > units.gu(80) |
303 | 43 | horizontalAlignment: Text.AlignRight | 44 | |
304 | 44 | height: units.gu(9) | 45 | Text { |
305 | 45 | width: units.gu(9) | 46 | id: valueBig |
306 | 46 | anchors { | 47 | objectName: "CurrentTempText" |
307 | 47 | top: parent.top | 48 | text: tempComponent.currentTemp |
308 | 48 | topMargin: units.gu(1) | 49 | color: Theme.palette.normal.baseText |
309 | 49 | left: parent.left | 50 | style: Text.Raised |
310 | 50 | leftMargin: units.gu(1) | 51 | font.bold: false |
311 | 51 | } | 52 | font.family: "Ubuntu" |
312 | 52 | } | 53 | font.pointSize: units.gu(14) |
313 | 53 | Text { | 54 | font.letterSpacing: -2 |
314 | 54 | id: currentTempScale | 55 | fontSizeMode: Text.Fit |
315 | 55 | objectName: "CurrentTempScale" | 56 | verticalAlignment: Text.AlignTop |
316 | 56 | text: String("°") + tempComponent.tempScale | 57 | horizontalAlignment: Text.AlignRight |
317 | 57 | style: Text.Raised | 58 | height: units.gu(14) |
318 | 58 | font.bold: false | 59 | width: units.gu(14) |
319 | 59 | font.family: "Ubuntu" | 60 | anchors { |
320 | 60 | font.pointSize: FontUtils.sizeToPixels("medium") | 61 | top: parent.top |
321 | 61 | verticalAlignment: Text.AlignTop | 62 | topMargin: units.gu(1) |
322 | 62 | horizontalAlignment: Text.AlignLeft | 63 | left: parent.left |
323 | 63 | color: Theme.palette.normal.baseText | 64 | leftMargin: units.gu(1) |
324 | 64 | height: units.gu(9) | 65 | } |
325 | 65 | anchors { | 66 | } |
326 | 66 | top: value.top | 67 | |
327 | 67 | topMargin: units.gu(0.5) | 68 | Text { |
328 | 68 | left: value.right | 69 | id: currentTempScaleBig |
329 | 69 | } | 70 | objectName: "CurrentTempScale" |
330 | 70 | } | 71 | text: String("°") + tempComponent.tempScale |
331 | 71 | 72 | style: Text.Raised | |
332 | 72 | Rectangle { | 73 | font.bold: false |
333 | 73 | id: line2 | 74 | font.family: "Ubuntu" |
334 | 74 | color: "#55000000" | 75 | font.pointSize: FontUtils.sizeToPixels("x-large"); |
335 | 75 | anchors { | 76 | verticalAlignment: Text.AlignTop |
336 | 76 | top: value.bottom | 77 | horizontalAlignment: Text.AlignLeft |
337 | 77 | left: parent.left | 78 | color: Theme.palette.normal.baseText |
338 | 78 | leftMargin: units.gu(2) | 79 | height: units.gu(9) |
339 | 79 | right: parent.right | 80 | anchors { |
340 | 80 | rightMargin: units.gu(2) | 81 | top: value.top |
341 | 81 | } | 82 | topMargin: units.gu(0.5) |
342 | 82 | height: 1 | 83 | left: value.right |
343 | 83 | width: units.gu(10) | 84 | } |
344 | 84 | 85 | } | |
345 | 85 | } | 86 | |
346 | 86 | Rectangle { | 87 | Rectangle { |
347 | 87 | color: "#55FFFFFF" | 88 | id: line2Big |
348 | 88 | anchors { | 89 | color: "#55000000" |
349 | 89 | top: line2.bottom | 90 | anchors { |
350 | 90 | bottomMargin: 1 | 91 | bottom: maxBig.top |
351 | 91 | left: line2.left | 92 | bottomMargin: units.gu(1) |
352 | 92 | right: line2.right | 93 | left: parent.left |
353 | 93 | } | 94 | leftMargin: units.gu(2) |
354 | 94 | height: 1 | 95 | right: parent.right |
355 | 95 | width: units.gu(10) | 96 | rightMargin: units.gu(2) |
356 | 96 | 97 | } | |
357 | 97 | } | 98 | height: 1 |
358 | 98 | 99 | width: units.gu(10) | |
359 | 99 | 100 | ||
360 | 100 | Text { | 101 | } |
361 | 101 | id: max | 102 | Rectangle { |
362 | 102 | // TRANSLATORS: this refers to the High (max) temperature forecasted for a day | 103 | color: "#55FFFFFF" |
363 | 103 | text: i18n.tr("H:") + " " + tempComponent.maxTemp | 104 | anchors { |
364 | 104 | color: Theme.palette.normal.baseText | 105 | top: line2Big.bottom |
365 | 105 | style: Text.Raised | 106 | bottomMargin: 1 |
366 | 106 | font.bold: false | 107 | left: line2Big.left |
367 | 107 | font.family: "Ubuntu" | 108 | right: line2Big.right |
368 | 108 | font.pointSize: FontUtils.sizeToPixels("small") | 109 | } |
369 | 109 | verticalAlignment: Text.AlignVCenter | 110 | height: 1 |
370 | 110 | horizontalAlignment: Text.AlignHCenter | 111 | width: units.gu(10) |
371 | 111 | visible:(dailyForecastList.currentIndex === 0 && tempComponent.maxTemp) | 112 | |
372 | 112 | anchors { | 113 | } |
373 | 113 | bottom: parent.bottom | 114 | |
374 | 114 | bottomMargin: units.gu(2) | 115 | |
375 | 115 | left: parent.left | 116 | Text { |
376 | 116 | leftMargin: units.gu(2) | 117 | id: maxBig |
377 | 117 | } | 118 | // TRANSLATORS: this refers to the High (max) temperature forecasted for a day |
378 | 118 | } | 119 | text: i18n.tr("H:") + " " + tempComponent.maxTemp |
379 | 119 | 120 | color: Theme.palette.normal.baseText | |
380 | 120 | Text { | 121 | style: Text.Raised |
381 | 121 | id: min | 122 | font.bold: false |
382 | 122 | // TRANSLATORS: this refers to the Low (min) temperature forecasted for a day | 123 | font.family: "Ubuntu" |
383 | 123 | text: i18n.tr("L:") + " " + tempComponent.minTemp | 124 | font.pointSize: FontUtils.sizeToPixels("large"); |
384 | 124 | color: Theme.palette.normal.baseText | 125 | verticalAlignment: Text.AlignVCenter |
385 | 125 | style: Text.Raised | 126 | horizontalAlignment: Text.AlignHCenter |
386 | 126 | font.bold: false | 127 | visible:(dailyForecastList.currentIndex === 0 && tempComponent.maxTemp) |
387 | 127 | font.family: "Ubuntu" | 128 | anchors { |
388 | 128 | font.pointSize: FontUtils.sizeToPixels("small") | 129 | bottom: parent.bottom |
389 | 129 | fontSizeMode: Text.Fit | 130 | bottomMargin: units.gu(2) |
390 | 130 | verticalAlignment: Text.AlignVCenter | 131 | left: parent.left |
391 | 131 | horizontalAlignment: Text.AlignHCenter | 132 | leftMargin: units.gu(2) |
392 | 132 | anchors { | 133 | } |
393 | 133 | bottom: parent.bottom | 134 | } |
394 | 134 | bottomMargin: units.gu(2) | 135 | |
395 | 135 | right: parent.right | 136 | Text { |
396 | 136 | rightMargin: units.gu(2) | 137 | id: minBig |
397 | 138 | // TRANSLATORS: this refers to the Low (min) temperature forecasted for a day | ||
398 | 139 | text: i18n.tr("L:") + " " + tempComponent.minTemp | ||
399 | 140 | color: Theme.palette.normal.baseText | ||
400 | 141 | style: Text.Raised | ||
401 | 142 | font.bold: false | ||
402 | 143 | font.family: "Ubuntu" | ||
403 | 144 | font.pointSize: FontUtils.sizeToPixels("large"); | ||
404 | 145 | fontSizeMode: Text.Fit | ||
405 | 146 | verticalAlignment: Text.AlignVCenter | ||
406 | 147 | horizontalAlignment: Text.AlignHCenter | ||
407 | 148 | anchors { | ||
408 | 149 | bottom: parent.bottom | ||
409 | 150 | bottomMargin: units.gu(2) | ||
410 | 151 | right: parent.right | ||
411 | 152 | rightMargin: units.gu(2) | ||
412 | 153 | } | ||
413 | 154 | } | ||
414 | 155 | } | ||
415 | 156 | |||
416 | 157 | ]*/ | ||
417 | 158 | |||
418 | 159 | |||
419 | 160 | Text { | ||
420 | 161 | id: value | ||
421 | 162 | objectName: "CurrentTempText" | ||
422 | 163 | text: tempComponent.currentTemp | ||
423 | 164 | color: Theme.palette.normal.baseText | ||
424 | 165 | style: Text.Raised | ||
425 | 166 | font.bold: false | ||
426 | 167 | font.family: "Ubuntu" | ||
427 | 168 | font.pointSize: (viewMode == 0) ? units.gu(9) : units.gu(18) //FontUtils.sizeToPixels("xx-large") | ||
428 | 169 | font.letterSpacing: -2 | ||
429 | 170 | fontSizeMode: Text.Fit | ||
430 | 171 | verticalAlignment: Text.AlignTop | ||
431 | 172 | horizontalAlignment: Text.AlignRight | ||
432 | 173 | height: (viewMode == 0) ? units.gu(9) : units.gu(18) | ||
433 | 174 | width: (viewMode == 0) ? units.gu(9) : units.gu(18) | ||
434 | 175 | anchors { | ||
435 | 176 | top: parent.top | ||
436 | 177 | topMargin: units.gu(1) | ||
437 | 178 | left: parent.left | ||
438 | 179 | leftMargin: units.gu(1) | ||
439 | 180 | } | ||
440 | 181 | } | ||
441 | 182 | Text { | ||
442 | 183 | id: currentTempScale | ||
443 | 184 | objectName: "CurrentTempScale" | ||
444 | 185 | text: String("°") + tempComponent.tempScale | ||
445 | 186 | style: Text.Raised | ||
446 | 187 | font.bold: false | ||
447 | 188 | font.family: "Ubuntu" | ||
448 | 189 | font.pointSize: (viewMode == 0) ? FontUtils.sizeToPixels("medium") : FontUtils.sizeToPixels("x-large") | ||
449 | 190 | verticalAlignment: Text.AlignTop | ||
450 | 191 | horizontalAlignment: Text.AlignLeft | ||
451 | 192 | color: Theme.palette.normal.baseText | ||
452 | 193 | height: units.gu(9) | ||
453 | 194 | anchors { | ||
454 | 195 | top: value.top | ||
455 | 196 | topMargin: units.gu(0.5) | ||
456 | 197 | left: value.right | ||
457 | 198 | } | ||
458 | 199 | } | ||
459 | 200 | |||
460 | 201 | Rectangle { | ||
461 | 202 | id: line2 | ||
462 | 203 | color: "#55000000" | ||
463 | 204 | anchors { | ||
464 | 205 | bottom: max.top | ||
465 | 206 | bottomMargin: (viewMode == 0) ? 0 : units.gu(1) | ||
466 | 207 | left: parent.left | ||
467 | 208 | leftMargin: units.gu(2) | ||
468 | 209 | right: parent.right | ||
469 | 210 | rightMargin: units.gu(2) | ||
470 | 211 | } | ||
471 | 212 | height: 1 | ||
472 | 213 | width: units.gu(10) | ||
473 | 214 | |||
474 | 215 | } | ||
475 | 216 | Rectangle { | ||
476 | 217 | color: "#55FFFFFF" | ||
477 | 218 | anchors { | ||
478 | 219 | top: line2.bottom | ||
479 | 220 | bottomMargin: 1 | ||
480 | 221 | left: line2.left | ||
481 | 222 | right: line2.right | ||
482 | 223 | } | ||
483 | 224 | height: 1 | ||
484 | 225 | width: units.gu(10) | ||
485 | 226 | |||
486 | 227 | } | ||
487 | 228 | |||
488 | 229 | |||
489 | 230 | Text { | ||
490 | 231 | id: max | ||
491 | 232 | // TRANSLATORS: this refers to the High (max) temperature forecasted for a day | ||
492 | 233 | text: i18n.tr("H:") + " " + tempComponent.maxTemp | ||
493 | 234 | color: Theme.palette.normal.baseText | ||
494 | 235 | style: Text.Raised | ||
495 | 236 | font.bold: false | ||
496 | 237 | font.family: "Ubuntu" | ||
497 | 238 | font.pointSize: (viewMode == 0) ? FontUtils.sizeToPixels("small") : FontUtils.sizeToPixels("large") | ||
498 | 239 | verticalAlignment: Text.AlignVCenter | ||
499 | 240 | horizontalAlignment: Text.AlignHCenter | ||
500 | 241 | visible:(dailyForecastList.currentIndex === 0 && tempComponent.maxTemp) | ||
501 | 242 | anchors { | ||
502 | 243 | bottom: parent.bottom | ||
503 | 244 | bottomMargin: units.gu(2) | ||
504 | 245 | left: parent.left | ||
505 | 246 | leftMargin: units.gu(2) | ||
506 | 247 | } | ||
507 | 248 | } | ||
508 | 249 | |||
509 | 250 | Text { | ||
510 | 251 | id: min | ||
511 | 252 | // TRANSLATORS: this refers to the Low (min) temperature forecasted for a day | ||
512 | 253 | text: i18n.tr("L:") + " " + tempComponent.minTemp | ||
513 | 254 | color: Theme.palette.normal.baseText | ||
514 | 255 | style: Text.Raised | ||
515 | 256 | font.bold: false | ||
516 | 257 | font.family: "Ubuntu" | ||
517 | 258 | font.pointSize: (viewMode == 0) ? FontUtils.sizeToPixels("small") : FontUtils.sizeToPixels("large") | ||
518 | 259 | fontSizeMode: Text.Fit | ||
519 | 260 | verticalAlignment: Text.AlignVCenter | ||
520 | 261 | horizontalAlignment: Text.AlignHCenter | ||
521 | 262 | anchors { | ||
522 | 263 | bottom: parent.bottom | ||
523 | 264 | bottomMargin: units.gu(2) | ||
524 | 265 | right: parent.right | ||
525 | 266 | rightMargin: units.gu(2) | ||
526 | 267 | } | ||
527 | 137 | } | 268 | } |
528 | 138 | } | 269 | } |
529 | 139 | } | 270 | } |
PASSED: Continuous integration, rev:201 91.189. 93.70:8080/ job/ubuntu- weather- app-ci/ 145/ 91.189. 93.70:8080/ job/generic- mediumtests- trusty- weather- app/31 91.189. 93.70:8080/ job/ubuntu- weather- app-raring- amd64-ci/ 143 91.189. 93.70:8080/ job/ubuntu- weather- app-saucy- amd64-ci/ 143 91.189. 93.70:8080/ job/ubuntu- weather- app-trusty- amd64-ci/ 57
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/ 145/rebuild
http://