From 5f5ac2d4351f4a364c65595688607d5cbcc4f386 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Sat, 14 Feb 2026 22:54:52 -0500 Subject: [PATCH] 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. --- .../actiondrawer/private/QuickSettings.qml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml b/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml index 2206cafa..5e63fdce 100644 --- a/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml +++ b/components/mobileshell/qml/actiondrawer/private/QuickSettings.qml @@ -46,18 +46,9 @@ Item { readonly property int columnCount: Math.floor(width/columnWidth) readonly property int rowCount: { let totalRows = Math.ceil(quickSettingsCount / columnCount); - - if (root.mode === QuickSettings.Pages) { - // portrait orientation - 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); - } + 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)); } readonly property int pageSize: rowCount * columnCount @@ -66,9 +57,7 @@ Item { readonly property alias brightnessPressedValue: brightnessItem.brightnessPressedValue function resetSwipeView() { - if (root.mode === QuickSettings.Pages) { - swipeView.currentIndex = 0; - } + swipeView.currentIndex = 0; } // return to the first page when the action drawer is closed