diff --git a/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml b/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml index cb22d589..e2106837 100644 --- a/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml +++ b/components/mobileshell/qml/actiondrawer/private/LandscapeContentContainer.qml @@ -12,6 +12,7 @@ import org.kde.plasma.core as PlasmaCore import org.kde.plasma.plasma5support 2.0 as P5Support import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell as MobileShell +import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS /** @@ -54,7 +55,8 @@ Item { height: quickSettingsPanel.contentImplicitHeight + quickSettingsPanel.topPadding + quickSettingsPanel.bottomPadding width: intendedWidth - readonly property real intendedWidth: 360 + readonly property real columnWidth: 6 * Kirigami.Units.gridUnit + readonly property real intendedWidth: (columnWidth * ShellSettings.Settings.quickSettingsColumns) + Kirigami.Units.gridUnit property real offsetRatio: quickSettingsPanel.height / root.height anchors.topMargin: Math.min(root.actionDrawer.offsetResistance * offsetRatio - quickSettingsPanel.height, 0) diff --git a/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml index 4069eec9..2206cafa 100644 --- a/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml @@ -11,6 +11,7 @@ import QtQuick.Layouts 1.1 import QtQuick.Window 2.2 import org.kde.plasma.private.mobileshell as MobileShell +import org.kde.plasma.private.mobileshell.shellsettingsplugin as ShellSettings import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.private.mobileshell.quicksettingsplugin as QS import org.kde.kirigami 2.20 as Kirigami @@ -28,7 +29,7 @@ Item { required property QS.QuickSettingsModel quickSettingsModel - readonly property real columns: Math.round(Math.min(6, Math.max(3, width / intendedColumnWidth))) + readonly property real columns: Math.round(Math.min(6, Math.max(ShellSettings.Settings.quickSettingsColumns, width / intendedColumnWidth))) readonly property real columnWidth: Math.floor(width / columns) readonly property int minimizedColumns: Math.round(Math.min(8, Math.max(5, width / intendedMinimizedColumnWidth))) readonly property real minimizedColumnWidth: Math.floor(width / minimizedColumns)