diff --git a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml index d5eafaf3..bb2edee7 100644 --- a/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml @@ -43,8 +43,14 @@ Item { readonly property MobileShell.QuickSettingsModel quickSettingsModel: MobileShell.QuickSettingsModel {} - readonly property int rowCount: Math.floor(Window.height * 65/100 / rowHeight) readonly property int columnCount: Math.floor(width/columnWidth) + readonly property int rowCount: { + let totalRows = quickSettingsCount / columnCount; + let isPortrait = MobileShell.Shell.orientation === MobileShell.Shell.Portrait; + let targetRows = Math.floor(Window.height * (isPortrait ? 0.65 : 0.8) / rowHeight); + return Math.min(totalRows, targetRows); + } + readonly property int pageSize: rowCount * columnCount readonly property int quickSettingsCount: quickSettingsModel.count