Narrow weather flyout and center forecast row
This commit is contained in:
@@ -179,7 +179,7 @@ Item {
|
|||||||
bar: root.bar
|
bar: root.bar
|
||||||
open: root.popupOpen
|
open: root.popupOpen
|
||||||
triggerMode: "click"
|
triggerMode: "click"
|
||||||
contentWidth: 520
|
contentWidth: 440
|
||||||
contentHeight: card.implicitHeight + 28
|
contentHeight: card.implicitHeight + 28
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
@@ -334,10 +334,16 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ---- Forecast row: each cell has the day icon left of a day-name + hi/lo column.
|
// ---- Forecast row: each cell has the day icon left of a day-name + hi/lo column.
|
||||||
Row {
|
// Wrapped in an Item so the block of cells can be centered within the popup.
|
||||||
id: forecastRow
|
Item {
|
||||||
visible: root.forecastDays.length > 0
|
visible: root.forecastDays.length > 0
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
height: forecastRow.height
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: forecastRow
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
spacing: 44
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
model: root.forecastDays
|
model: root.forecastDays
|
||||||
@@ -345,7 +351,6 @@ Item {
|
|||||||
Row {
|
Row {
|
||||||
required property var modelData
|
required property var modelData
|
||||||
required property int index
|
required property int index
|
||||||
width: forecastRow.width / Math.max(1, root.forecastDays.length)
|
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@@ -390,4 +395,5 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user