SidePanel: even more robust with sizing forced everywhere
This commit is contained in:
parent
4d6361dfe5
commit
a8b312f3a7
6 changed files with 13 additions and 21 deletions
|
|
@ -9,13 +9,11 @@ import qs.Widgets
|
||||||
|
|
||||||
// Power Profiles: performance, balanced, eco
|
// Power Profiles: performance, balanced, eco
|
||||||
NBox {
|
NBox {
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
property real spacing: 0
|
||||||
implicitHeight: powerRow.implicitHeight + Style.marginM * 2 * scaling
|
|
||||||
|
|
||||||
// Centralized service
|
// Centralized service
|
||||||
readonly property bool hasPP: PowerProfileService.available
|
readonly property bool hasPP: PowerProfileService.available
|
||||||
property real spacing: 0
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: powerRow
|
id: powerRow
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,6 @@ NBox {
|
||||||
|
|
||||||
property string uptimeText: "--"
|
property string uptimeText: "--"
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
// Height driven by content
|
|
||||||
implicitHeight: content.implicitHeight + Style.marginM * 2 * scaling
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: content
|
id: content
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import qs.Widgets
|
||||||
NBox {
|
NBox {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
Layout.preferredWidth: Style.baseWidgetSize * 2.625 * scaling
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,7 @@ NBox {
|
||||||
|
|
||||||
property real spacing: 0
|
property real spacing: 0
|
||||||
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
|
||||||
implicitHeight: utilRow.implicitHeight + Style.marginM * 2 * scaling
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: utilRow
|
id: utilRow
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,6 @@ NBox {
|
||||||
|
|
||||||
readonly property bool weatherReady: (LocationService.data.weather !== null)
|
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 {
|
ColumnLayout {
|
||||||
id: content
|
id: content
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ NPanel {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
preferredWidth: 460
|
preferredWidth: 460
|
||||||
preferredHeight: 730
|
preferredHeight: 734
|
||||||
|
|
||||||
panelContent: Item {
|
panelContent: Item {
|
||||||
id: content
|
id: content
|
||||||
|
|
@ -29,10 +29,12 @@ NPanel {
|
||||||
// Cards (consistent inter-card spacing via ColumnLayout spacing)
|
// Cards (consistent inter-card spacing via ColumnLayout spacing)
|
||||||
ProfileCard {
|
ProfileCard {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: Math.max(64 * scaling)
|
||||||
}
|
}
|
||||||
|
|
||||||
WeatherCard {
|
WeatherCard {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: Math.max(220 * scaling)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Middle section: media + stats column
|
// Middle section: media + stats column
|
||||||
|
|
@ -49,6 +51,7 @@ NPanel {
|
||||||
|
|
||||||
// System monitors combined in one card
|
// System monitors combined in one card
|
||||||
SystemMonitorCard {
|
SystemMonitorCard {
|
||||||
|
Layout.preferredWidth: Style.baseWidgetSize * 2.625 * scaling
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -61,14 +64,16 @@ NPanel {
|
||||||
|
|
||||||
// Power Profiles switcher
|
// Power Profiles switcher
|
||||||
PowerProfilesCard {
|
PowerProfilesCard {
|
||||||
spacing: content.cardSpacing
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
spacing: content.cardSpacing
|
||||||
}
|
}
|
||||||
|
|
||||||
// Utilities buttons
|
// Utilities buttons
|
||||||
UtilitiesCard {
|
UtilitiesCard {
|
||||||
spacing: content.cardSpacing
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
spacing: content.cardSpacing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue