ControlCenter: Looks better when it's taller and less wide.

This commit is contained in:
ItsLemmy
2025-10-09 20:20:26 -04:00
parent 4d0041abee
commit 3fe63f463e
4 changed files with 20 additions and 28 deletions
@@ -9,14 +9,11 @@ import qs.Widgets
NBox {
id: root
GridLayout {
RowLayout {
id: content
anchors.fill: parent
anchors.margins: Style.marginXS * scaling
columns: 2
rows: 2
columnSpacing: Style.marginS * scaling
rowSpacing: Style.marginS * scaling
spacing: Style.marginS * scaling
NCircleStat {
value: SystemStatService.cpuUsage
+1 -1
View File
@@ -105,7 +105,7 @@ NBox {
GridLayout {
id: grid
Layout.fillWidth: true
columns: (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 5 : 3
columns: (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
columnSpacing: Style.marginM * scaling
rowSpacing: Style.marginS * scaling
+15 -20
View File
@@ -10,13 +10,13 @@ import qs.Widgets
NPanel {
id: root
preferredWidth: 440
preferredHeight: topHeight + bottomHeight + Math.round(Style.marginL * 3)
preferredWidth: 400
preferredHeight: topHeight + midHeight + bottomHeight + Math.round(Style.marginL * 4)
panelKeyboardFocus: true
readonly property int bottomHeight: 196
readonly property int topHeight: {
const columns = (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 5 : 3
const columns = (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
const rowsCount = Math.ceil(Settings.data.controlCenter.widgets.quickSettings.length / columns)
var buttonHeight
@@ -30,6 +30,9 @@ NPanel {
return (rowsCount * buttonHeight) + 120
}
readonly property int midHeight: 220
readonly property int bottomHeight: 80
// Positioning
readonly property string controlCenterPosition: Settings.data.controlCenter.position
@@ -59,24 +62,16 @@ NPanel {
Layout.preferredHeight: topHeight * scaling
}
// Media + stats column
RowLayout {
id: bottomCard
// Media card
MediaCard {
Layout.fillWidth: true
Layout.preferredHeight: midHeight * scaling
}
// System monitors combined in one card
SystemMonitorCard {
Layout.fillWidth: true
Layout.preferredHeight: bottomHeight * scaling
spacing: content.cardSpacing
// Media card
MediaCard {
Layout.preferredWidth: Math.max(250 * scaling)
Layout.preferredHeight: bottomHeight * scaling
}
// System monitors combined in one card
SystemMonitorCard {
Layout.preferredWidth: Math.max(140 * scaling)
Layout.preferredHeight: bottomHeight * scaling
}
}
}
}