NPanel refactor - 1st pass: SidePanel and settings an new logic

This commit is contained in:
quadbyte 2025-08-20 08:45:48 -04:00
parent c8a93d7d1e
commit 57fee68793
14 changed files with 500 additions and 616 deletions

View file

@ -16,12 +16,13 @@ NBox {
// PowerProfiles service
property var powerProfiles: PowerProfiles
readonly property bool hasPP: powerProfiles.hasPerformanceProfile
property real spacing: 0
RowLayout {
id: powerRow
anchors.fill: parent
anchors.margins: Style.marginS * scaling
spacing: sidePanel.cardSpacing
spacing: spacing
Item {
Layout.fillWidth: true
}

View file

@ -61,7 +61,7 @@ NBox {
tooltipText: "Open Settings"
onClicked: {
settingsPanel.requestedTab = SettingsPanel.Tab.General
settingsPanel.isLoaded = !settingsPanel.isLoaded
settingsPanel.open(screen)
}
}
@ -78,8 +78,9 @@ NBox {
PowerMenu {
id: powerMenu
anchors.top: powerButton.bottom
anchors.right: powerButton.right
// TBC
// anchors.top: powerButton.bottom
// anchors.right: powerButton.right
}
// ----------------------------------

View file

@ -9,6 +9,9 @@ import qs.Widgets
// Utilities: record & wallpaper
NBox {
property real spacing: 0
Layout.fillWidth: true
Layout.preferredWidth: 1
implicitHeight: utilRow.implicitHeight + Style.marginM * 2 * scaling
@ -16,7 +19,7 @@ NBox {
id: utilRow
anchors.fill: parent
anchors.margins: Style.marginS * scaling
spacing: sidePanel.cardSpacing
spacing: spacing
Item {
Layout.fillWidth: true
}
@ -37,7 +40,7 @@ NBox {
tooltipText: "Open Wallpaper Selector"
onClicked: {
settingsPanel.requestedTab = SettingsPanel.Tab.WallpaperSelector
settingsPanel.isLoaded = true
settingsPanel.open(screen)
}
}