From 75a8c171eaadf735578d9382840ab49c9bbfd5b6 Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 16 Feb 2026 12:17:46 -0500 Subject: [PATCH] launcher: remove double loader --- .../DankLauncherV2/DankLauncherV2Modal.qml | 1 - .../Modals/DankLauncherV2/LauncherContent.qml | 17 +++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml b/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml index e3f234a8..95e7c2e9 100644 --- a/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml +++ b/quickshell/Modals/DankLauncherV2/DankLauncherV2Modal.qml @@ -402,7 +402,6 @@ Item { sourceComponent: LauncherContent { focus: true parentModal: root - heavyContentActive: !SettingsData.dankLauncherV2UnloadOnClose || spotlightOpen || isClosing } onLoaded: { diff --git a/quickshell/Modals/DankLauncherV2/LauncherContent.qml b/quickshell/Modals/DankLauncherV2/LauncherContent.qml index 2a4b64d6..1444cbbd 100644 --- a/quickshell/Modals/DankLauncherV2/LauncherContent.qml +++ b/quickshell/Modals/DankLauncherV2/LauncherContent.qml @@ -12,11 +12,10 @@ FocusScope { LayoutMirroring.childrenInherit: true property var parentModal: null - property bool heavyContentActive: true property string viewModeContext: "spotlight" property alias searchField: searchField property alias controller: controller - property var resultsList: resultsLoader.item + property alias resultsList: resultsList property alias actionPanel: actionPanel property bool editMode: false @@ -24,8 +23,7 @@ FocusScope { property string editAppId: "" function resetScroll() { - if (resultsList) - resultsList.resetScroll(); + resultsList.resetScroll(); } function focusSearchField() { @@ -224,7 +222,7 @@ FocusScope { return; case Qt.Key_Menu: case Qt.Key_F10: - if (resultsList && contextMenu.hasContextMenuActions(controller.selectedItem)) { + if (contextMenu.hasContextMenuActions(controller.selectedItem)) { var scenePos = resultsList.getSelectedItemPosition(); var localPos = root.mapFromItem(null, scenePos.x, scenePos.y); showContextMenu(controller.selectedItem, localPos.x, localPos.y, true); @@ -553,15 +551,14 @@ FocusScope { } } - Loader { - id: resultsLoader + Item { width: parent.width height: parent.height - searchField.height - categoryRow.height - actionPanel.height - Theme.spacingXS * (categoryRow.visible ? 3 : 2) - active: root.heavyContentActive - asynchronous: false opacity: root.parentModal?.isClosing ? 0 : 1 - sourceComponent: ResultsList { + ResultsList { + id: resultsList + anchors.fill: parent controller: root.controller onItemRightClicked: (index, item, sceneX, sceneY) => {