QuickSettings: compact version uses 4 per row

This commit is contained in:
lysec
2025-10-09 15:48:23 +02:00
parent 7828199d30
commit 7dbb3deeea
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ NBox {
GridLayout {
id: grid
Layout.fillWidth: true
columns: 3
columns: (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
columnSpacing: Style.marginM * scaling
rowSpacing: Style.marginS * scaling
+5 -1
View File
@@ -16,12 +16,16 @@ NPanel {
readonly property int bottomHeight: Math.round(Math.max(196 * scaling))
readonly property int topHeight: {
const rowsCount = Math.ceil(Settings.data.controlCenter.widgets.quickSettings.length / 3)
const columns = (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
const rowsCount = Math.ceil(Settings.data.controlCenter.widgets.quickSettings.length / columns)
var buttonHeight;
if (Settings.data.controlCenter.quickSettingsStyle === "classic") {
buttonHeight = Style.baseWidgetSize
}
else if (Settings.data.controlCenter.quickSettingsStyle === "compact") {
buttonHeight = Style.baseWidgetSize * 0.8 // Smaller for compact
}
else {
buttonHeight = 56
}