mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
quicksettings: Fix row count calculation
This commit is contained in:
parent
85e434913b
commit
620fd8a433
1 changed files with 3 additions and 4 deletions
|
|
@ -45,7 +45,7 @@ Item {
|
|||
|
||||
readonly property int columnCount: Math.floor(width/columnWidth)
|
||||
readonly property int rowCount: {
|
||||
let totalRows = quickSettingsCount / columnCount;
|
||||
let totalRows = Math.ceil(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);
|
||||
|
|
@ -285,7 +285,6 @@ Item {
|
|||
id: quickSettingComponent
|
||||
|
||||
Components.BaseItem {
|
||||
|
||||
height: root.rowHeight
|
||||
width: root.columnWidth
|
||||
padding: PlasmaCore.Units.smallSpacing
|
||||
|
|
|
|||
Loading…
Reference in a new issue