From 626089800a3485cd96949aeecc19e5f9f86d76b5 Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Thu, 13 Jan 2022 19:42:01 -0500 Subject: [PATCH] homescreen: Close app drawer when app is launched --- .../qml/appdrawer/DrawerGridDelegate.qml | 4 ++++ .../qml/appdrawer/DrawerListDelegate.qml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/components/mobilehomescreencomponents/qml/appdrawer/DrawerGridDelegate.qml b/components/mobilehomescreencomponents/qml/appdrawer/DrawerGridDelegate.qml index 3f232d10..39b37389 100644 --- a/components/mobilehomescreencomponents/qml/appdrawer/DrawerGridDelegate.qml +++ b/components/mobilehomescreencomponents/qml/appdrawer/DrawerGridDelegate.qml @@ -36,11 +36,15 @@ MouseArea { } onClicked: { + // launch app if (model.applicationRunning) { delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); } else { delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); } + + // close the app drawer + MobileShell.HomeScreenControls.openHomeScreen(); } //preventStealing: true diff --git a/components/mobilehomescreencomponents/qml/appdrawer/DrawerListDelegate.qml b/components/mobilehomescreencomponents/qml/appdrawer/DrawerListDelegate.qml index 18fc43cf..65115a92 100644 --- a/components/mobilehomescreencomponents/qml/appdrawer/DrawerListDelegate.qml +++ b/components/mobilehomescreencomponents/qml/appdrawer/DrawerListDelegate.qml @@ -34,11 +34,15 @@ MouseArea { } onClicked: { + // launch app if (model.applicationRunning) { delegate.launch(0, 0, "", model.applicationName, model.applicationStorageId); } else { delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, model.applicationName, model.applicationStorageId); } + + // close the app drawer + MobileShell.HomeScreenControls.openHomeScreen(); } hoverEnabled: true