Commit 3a0a7440 authored by Devin Lin's avatar Devin Lin 🎨
Browse files

quicksettings: Fix brightness slider alignment, and forced row count

parent c4806c6f
Pipeline #196376 passed with stage
in 1 minute and 5 seconds
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment