mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-03 19:01:50 +00:00
QuickSettings: compact version uses 4 per row
This commit is contained in:
@@ -105,7 +105,7 @@ NBox {
|
|||||||
GridLayout {
|
GridLayout {
|
||||||
id: grid
|
id: grid
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
columns: 3
|
columns: (Settings.data.controlCenter.quickSettingsStyle === "compact") ? 4 : 3
|
||||||
columnSpacing: Style.marginM * scaling
|
columnSpacing: Style.marginM * scaling
|
||||||
rowSpacing: Style.marginS * scaling
|
rowSpacing: Style.marginS * scaling
|
||||||
|
|
||||||
|
|||||||
@@ -16,12 +16,16 @@ NPanel {
|
|||||||
|
|
||||||
readonly property int bottomHeight: Math.round(Math.max(196 * scaling))
|
readonly property int bottomHeight: Math.round(Math.max(196 * scaling))
|
||||||
readonly property int topHeight: {
|
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;
|
var buttonHeight;
|
||||||
if (Settings.data.controlCenter.quickSettingsStyle === "classic") {
|
if (Settings.data.controlCenter.quickSettingsStyle === "classic") {
|
||||||
buttonHeight = Style.baseWidgetSize
|
buttonHeight = Style.baseWidgetSize
|
||||||
}
|
}
|
||||||
|
else if (Settings.data.controlCenter.quickSettingsStyle === "compact") {
|
||||||
|
buttonHeight = Style.baseWidgetSize * 0.8 // Smaller for compact
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
buttonHeight = 56
|
buttonHeight = 56
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user