mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-05-25 23:48:39 +00:00
QuickSettings: compact version uses 4 per row
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user