mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 17:22:08 -04:00
weather: keep tab height consistent
This commit is contained in:
@@ -12,7 +12,7 @@ Item {
|
|||||||
LayoutMirroring.childrenInherit: true
|
LayoutMirroring.childrenInherit: true
|
||||||
|
|
||||||
implicitWidth: 700
|
implicitWidth: 700
|
||||||
implicitHeight: root.available ? mainColumn.implicitHeight : unavailableColumn.implicitHeight + Theme.spacingXL * 2
|
implicitHeight: 410
|
||||||
property bool syncing: false
|
property bool syncing: false
|
||||||
property bool showHourly: false
|
property bool showHourly: false
|
||||||
property bool available: WeatherService.weather.available
|
property bool available: WeatherService.weather.available
|
||||||
@@ -848,6 +848,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: chipsRow
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: forecastChips.height
|
height: forecastChips.height
|
||||||
|
|
||||||
@@ -939,7 +940,7 @@ Item {
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: root.showHourly ? ((hourlyLoader.item?.cardHeight ?? (Theme.fontSizeLarge * 6)) + Theme.spacingXS) : ((dailyLoader.item?.cardHeight ?? (Theme.fontSizeLarge * 6)) + Theme.spacingXS)
|
height: root.height - heroCard.height - skyDateRow.height - chipsRow.height - mainColumn.spacing * 3
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: dailyLoader
|
id: dailyLoader
|
||||||
@@ -981,8 +982,7 @@ Item {
|
|||||||
id: hourlyComponent
|
id: hourlyComponent
|
||||||
ListView {
|
ListView {
|
||||||
id: hourlyList
|
id: hourlyList
|
||||||
width: parent.width
|
anchors.fill: parent
|
||||||
height: cardHeight + Theme.spacingXS
|
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
clip: true
|
clip: true
|
||||||
@@ -990,10 +990,8 @@ Item {
|
|||||||
highlightRangeMode: ListView.StrictlyEnforceRange
|
highlightRangeMode: ListView.StrictlyEnforceRange
|
||||||
highlightMoveDuration: 0
|
highlightMoveDuration: 0
|
||||||
interactive: true
|
interactive: true
|
||||||
contentHeight: cardHeight
|
|
||||||
contentWidth: cardWidth
|
|
||||||
|
|
||||||
property var cardHeight: Theme.fontSizeLarge * 6
|
property var cardHeight: height
|
||||||
property var cardWidth: ((hourlyList.width + hourlyList.spacing) / hourlyList.visibleCount) - hourlyList.spacing
|
property var cardWidth: ((hourlyList.width + hourlyList.spacing) / hourlyList.visibleCount) - hourlyList.spacing
|
||||||
property int initialIndex: (new Date()).getHours()
|
property int initialIndex: (new Date()).getHours()
|
||||||
property bool dense: !SessionData.weatherHourlyDetailed
|
property bool dense: !SessionData.weatherHourlyDetailed
|
||||||
@@ -1070,8 +1068,7 @@ Item {
|
|||||||
id: dailyComponent
|
id: dailyComponent
|
||||||
ListView {
|
ListView {
|
||||||
id: dailyList
|
id: dailyList
|
||||||
width: parent.width
|
anchors.fill: parent
|
||||||
height: cardHeight + Theme.spacingXS
|
|
||||||
orientation: ListView.Horizontal
|
orientation: ListView.Horizontal
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
clip: true
|
clip: true
|
||||||
@@ -1079,10 +1076,8 @@ Item {
|
|||||||
highlightRangeMode: ListView.StrictlyEnforceRange
|
highlightRangeMode: ListView.StrictlyEnforceRange
|
||||||
highlightMoveDuration: 0
|
highlightMoveDuration: 0
|
||||||
interactive: true
|
interactive: true
|
||||||
contentHeight: cardHeight
|
|
||||||
contentWidth: cardWidth
|
|
||||||
|
|
||||||
property var cardHeight: Theme.fontSizeLarge * 6
|
property var cardHeight: height
|
||||||
property var cardWidth: ((dailyList.width + dailyList.spacing) / dailyList.visibleCount) - dailyList.spacing
|
property var cardWidth: ((dailyList.width + dailyList.spacing) / dailyList.visibleCount) - dailyList.spacing
|
||||||
property int initialIndex: 0
|
property int initialIndex: 0
|
||||||
property bool dense: false
|
property bool dense: false
|
||||||
|
|||||||
Reference in New Issue
Block a user