aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-13 14:42:17 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-13 14:47:40 +0000
commit7615d1cc666613201d7ac17a7c95be52ae830951 (patch)
tree3bc98e1edb08e53fe0471170afe5121455bf7d2a
parent455b6399b3a807daf4aace28a70ecb455d74c855 (diff)
Wearable: cleanup WeatherPage
Change-Id: Iaed6c6370e9a8ec7e6e523ee87802d51531f5bba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml67
1 files changed, 16 insertions, 51 deletions
diff --git a/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml b/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml
index 1f24c214..2ef0133c 100644
--- a/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml
+++ b/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml
@@ -64,22 +64,15 @@ Item {
Row {
anchors.centerIn: parent
- width: UIStyle.visibleDiameter
- height: UIStyle.visibleRectHeight
- padding: 20
spacing: 2
Image {
anchors.verticalCenter: parent.verticalCenter
- height: 64
- width: 64
source: "images/temperature.png"
}
Column {
anchors.verticalCenter: parent.verticalCenter
- height: parent.height
- topPadding: 20
spacing: 40
Text {
@@ -93,6 +86,7 @@ Item {
font.letterSpacing: 1
color: UIStyle.colorQtGray1
}
+
Text {
text: (wDataCntr.weatherData
&& wDataCntr.weatherData.main
@@ -104,6 +98,7 @@ Item {
font.letterSpacing: 1
color: UIStyle.colorQtGray1
}
+
Text {
text: (wDataCntr.weatherData
&& wDataCntr.weatherData.main
@@ -123,27 +118,20 @@ Item {
id: weatherPage2
Column {
+ spacing: 40
anchors.centerIn: parent
- width: UIStyle.visibleRectWidth
- height: UIStyle.visibleRectHeight
- Item {
+ Row {
+ spacing: 20
anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height / 2
- width: parent.width
Image {
id: wImg
- anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
- height: 64
- width: 64
source: "images/wind.png"
}
Text {
- anchors.left: wImg.right
- leftPadding: 20
anchors.verticalCenter: parent.verticalCenter
text: (wDataCntr.weatherData
&& wDataCntr.weatherData.wind
@@ -155,22 +143,18 @@ Item {
color: UIStyle.colorQtGray1
}
}
- Item {
+
+ Row {
+ spacing: 20
anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height / 2
- width: parent.width
Image {
id: hImg
- anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
- height: 64
- width: 64
source: "images/humidity.png"
}
+
Text {
- anchors.left: hImg.right
- leftPadding: 20
anchors.verticalCenter: parent.verticalCenter
text: (wDataCntr.weatherData
&& wDataCntr.weatherData.main
@@ -190,21 +174,15 @@ Item {
Row {
anchors.centerIn: parent
- width: UIStyle.visibleRectWidth
- height: UIStyle.visibleRectHeight
spacing: 10
Image {
anchors.verticalCenter: parent.verticalCenter
- height: 64
- width: 64
source: "images/pressure.png"
}
Column {
anchors.verticalCenter: parent.verticalCenter
- height: parent.height
- topPadding: 25
spacing: 40
Text {
@@ -218,6 +196,7 @@ Item {
font.letterSpacing: 1
color: UIStyle.colorQtGray1
}
+
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: (wDataCntr.weatherData
@@ -229,6 +208,7 @@ Item {
font.letterSpacing: 1
color: UIStyle.colorQtGray1
}
+
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: (wDataCntr.weatherData
@@ -248,27 +228,19 @@ Item {
id: weatherPage4
Column {
+ spacing: 40
anchors.centerIn: parent
- width: UIStyle.visibleDiameter
- height: UIStyle.visibleRectHeight
- Item {
+ Row {
+ spacing: 30
anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height / 2
- width: parent.width
Image {
- anchors.left: parent.left
- anchors.leftMargin: 30
anchors.verticalCenter: parent.verticalCenter
- height: 64
- width: 64
source: "images/sunrise.png"
}
Text {
- anchors.right: parent.right
- anchors.rightMargin: 30
anchors.verticalCenter: parent.verticalCenter
text: (wDataCntr.weatherData
&& wDataCntr.weatherData.sys
@@ -281,23 +253,16 @@ Item {
}
}
- Item {
+ Row {
+ spacing: 30
anchors.horizontalCenter: parent.horizontalCenter
- height: parent.height / 2
- width: parent.width
Image {
- anchors.left: parent.left
- anchors.leftMargin: 30
anchors.verticalCenter: parent.verticalCenter
- height: 64
- width: 64
source: "images/sunset.png"
}
Text {
- anchors.right: parent.right
- anchors.rightMargin: 30
anchors.verticalCenter: parent.verticalCenter
text: (wDataCntr.weatherData
&& wDataCntr.weatherData.sys