mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
quicksettings: Fix brightness slider alignment, and forced row count
This commit is contained in:
parent
c4806c6fb5
commit
3a0a744051
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue