SidePanel: even more robust with sizing forced everywhere

This commit is contained in:
LemmyCook 2025-09-11 11:47:09 -04:00
parent 4d6361dfe5
commit a8b312f3a7
6 changed files with 13 additions and 21 deletions

View file

@ -9,13 +9,11 @@ import qs.Widgets
// Power Profiles: performance, balanced, eco
NBox {
Layout.fillWidth: true
Layout.preferredWidth: 1
implicitHeight: powerRow.implicitHeight + Style.marginM * 2 * scaling
property real spacing: 0
// Centralized service
readonly property bool hasPP: PowerProfileService.available
property real spacing: 0
RowLayout {
id: powerRow

View file

@ -16,10 +16,6 @@ NBox {
property string uptimeText: "--"
Layout.fillWidth: true
// Height driven by content
implicitHeight: content.implicitHeight + Style.marginM * 2 * scaling
RowLayout {
id: content
anchors.left: parent.left

View file

@ -8,7 +8,7 @@ import qs.Widgets
NBox {
id: root
Layout.preferredWidth: Style.baseWidgetSize * 2.625 * scaling
ColumnLayout {
id: content

View file

@ -12,9 +12,7 @@ NBox {
property real spacing: 0
Layout.fillWidth: true
Layout.preferredWidth: 1
implicitHeight: utilRow.implicitHeight + Style.marginM * 2 * scaling
RowLayout {
id: utilRow
anchors.fill: parent

View file

@ -11,11 +11,6 @@ NBox {
readonly property bool weatherReady: (LocationService.data.weather !== null)
// TBC weatherReady is not turning to false when we reset weather...
Layout.fillWidth: true
// Height driven by content
implicitHeight: content.implicitHeight + Style.marginL * 2 * scaling
ColumnLayout {
id: content
anchors.left: parent.left

View file

@ -11,7 +11,7 @@ NPanel {
id: root
preferredWidth: 460
preferredHeight: 730
preferredHeight: 734
panelContent: Item {
id: content
@ -29,10 +29,12 @@ NPanel {
// Cards (consistent inter-card spacing via ColumnLayout spacing)
ProfileCard {
Layout.fillWidth: true
Layout.preferredHeight: Math.max(64 * scaling)
}
WeatherCard {
Layout.fillWidth: true
Layout.preferredHeight: Math.max(220 * scaling)
}
// Middle section: media + stats column
@ -49,6 +51,7 @@ NPanel {
// System monitors combined in one card
SystemMonitorCard {
Layout.preferredWidth: Style.baseWidgetSize * 2.625 * scaling
Layout.fillHeight: true
}
}
@ -61,14 +64,16 @@ NPanel {
// Power Profiles switcher
PowerProfilesCard {
spacing: content.cardSpacing
Layout.fillWidth: true
Layout.fillHeight: true
spacing: content.cardSpacing
}
// Utilities buttons
UtilitiesCard {
spacing: content.cardSpacing
Layout.fillWidth: true
Layout.fillHeight: true
spacing: content.cardSpacing
}
}
}