quicksettings: Fix references to non existent "mode" property

This was removed when we changed the QuickSettingsPanel to use a SwipeView rather than a scrolling list. Fix remaining references to it.
This commit is contained in:
Devin Lin 2026-02-14 22:54:52 -05:00
parent 3b90a01ba4
commit 5f5ac2d435

View file

@ -46,18 +46,9 @@ Item {
readonly property int columnCount: Math.floor(width/columnWidth) readonly property int columnCount: Math.floor(width/columnWidth)
readonly property int rowCount: { readonly property int rowCount: {
let totalRows = Math.ceil(quickSettingsCount / columnCount); let totalRows = Math.ceil(quickSettingsCount / columnCount);
let maxRows = 5; // more than 5 is just disorienting
if (root.mode === QuickSettings.Pages) { let targetRows = Math.floor(Window.height * 0.65 / rowHeight);
// portrait orientation return Math.min(maxRows, Math.min(totalRows, targetRows));
let maxRows = 5; // more than 5 is just disorienting
let targetRows = Math.floor(Window.height * 0.65 / rowHeight);
return Math.min(maxRows, Math.min(totalRows, targetRows));
} else if (root.mode === QuickSettings.ScrollView) {
// horizontal orientation
let targetRows = Math.floor(Window.height * 0.8 / rowHeight);
return Math.min(totalRows, targetRows);
}
} }
readonly property int pageSize: rowCount * columnCount readonly property int pageSize: rowCount * columnCount
@ -66,9 +57,7 @@ Item {
readonly property alias brightnessPressedValue: brightnessItem.brightnessPressedValue readonly property alias brightnessPressedValue: brightnessItem.brightnessPressedValue
function resetSwipeView() { function resetSwipeView() {
if (root.mode === QuickSettings.Pages) { swipeView.currentIndex = 0;
swipeView.currentIndex = 0;
}
} }
// return to the first page when the action drawer is closed // return to the first page when the action drawer is closed