WeatherCard: better layout
This commit is contained in:
parent
c71029487a
commit
03687f95f3
1 changed files with 14 additions and 16 deletions
|
|
@ -21,7 +21,6 @@ NBox {
|
||||||
anchors.margins: Style.marginMedium * scaling
|
anchors.margins: Style.marginMedium * scaling
|
||||||
spacing: Style.marginMedium * scaling
|
spacing: Style.marginMedium * scaling
|
||||||
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: Style.marginSmall * scaling
|
spacing: Style.marginSmall * scaling
|
||||||
NText {
|
NText {
|
||||||
|
|
@ -35,11 +34,11 @@ NBox {
|
||||||
NText {
|
NText {
|
||||||
text: Settings.data.location.name
|
text: Settings.data.location.name
|
||||||
font.weight: Style.fontWeightBold
|
font.weight: Style.fontWeightBold
|
||||||
font.pointSize: Style.fontSizeLarge * scaling
|
font.pointSize: Style.fontSizeXL * scaling
|
||||||
}
|
}
|
||||||
NText {
|
NText {
|
||||||
text: `(${Location.data.weather.timezone_abbreviation})`
|
text: `(${Location.data.weather.timezone_abbreviation})`
|
||||||
font.pointSize: Style.fontSizeTiny * scaling
|
font.pointSize: Style.fontSizeSmall * scaling
|
||||||
visible: Location.data.weather
|
visible: Location.data.weather
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -59,28 +58,27 @@ NBox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
NDivider {
|
||||||
height: 1
|
Layout.fillWidth: true
|
||||||
width: parent.width
|
|
||||||
color: Colors.backgroundTertiary
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: Style.marginMedium * scaling
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
spacing: Style.marginLarge* scaling
|
||||||
Repeater {
|
Repeater {
|
||||||
model: Location.data.weather.daily.time
|
model: Location.data.weather.daily.time
|
||||||
delegate: ColumnLayout {
|
delegate: ColumnLayout {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
spacing: Style.spacingSmall * scaling
|
spacing: Style.spacingSmall * scaling
|
||||||
NText {
|
NText {
|
||||||
text: Qt.formatDateTime(new Date(Location.data.weather.daily.time[index]), "ddd")
|
text: Qt.formatDateTime(new Date(Location.data.weather.daily.time[index]), "ddd")
|
||||||
font.weight: Style.fontWeightBold
|
color: Colors.textPrimary
|
||||||
}
|
}
|
||||||
NText {
|
NText {
|
||||||
text: Location.weatherSymbolFromCode(Location.data.weather.daily.weathercode[index])
|
text: Location.weatherSymbolFromCode(Location.data.weather.daily.weathercode[index])
|
||||||
font.family: "Material Symbols Outlined"
|
font.family: "Material Symbols Outlined"
|
||||||
font.pointSize: Style.fontSizeLarge * scaling
|
font.pointSize: Style.fontSizeXL * scaling
|
||||||
font.weight: Style.fontWeightBold
|
|
||||||
color: Colors.textSecondary
|
color: Colors.textSecondary
|
||||||
}
|
}
|
||||||
NText {
|
NText {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue