From d1585495256e3432e317a644fb77c0d7e6e113dd Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Mon, 20 Jun 2022 23:23:11 -0400 Subject: [PATCH] homescreens/halcyon: Fix wallpaper menu not being opened in certain tap areas --- .../package/contents/ui/HomeScreen.qml | 28 +++++++++++++------ .../halcyon/package/contents/ui/main.qml | 2 +- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml index 75e6fcd9..c9a5971b 100644 --- a/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml +++ b/containments/homescreens/halcyon/package/contents/ui/HomeScreen.qml @@ -28,6 +28,12 @@ Item { favouritesList.contentY = favouritesList.originY; } + function openConfigure() { + console.log('triggered') + plasmoid.action("configure").trigger(); + plasmoid.editMode = false; + } + QQC2.SwipeView { id: swipeView opacity: 1 - searchWidget.openFactor @@ -42,6 +48,11 @@ Item { Item { height: swipeView.height width: swipeView.width + + // open wallpaper menu when held on click + TapHandler { + onLongPressed: root.openConfigure() + } ListView { id: favouritesList @@ -53,20 +64,16 @@ Item { anchors.leftMargin: Math.round(parent.width * 0.1) anchors.rightMargin: Math.round(parent.width * 0.1) - // open wallpaper menu when held on click - TapHandler { - onLongPressed: { - plasmoid.action("configure").trigger(); - plasmoid.editMode = false; - } - } - model: Halcyon.PinnedModel header: MobileShell.BaseItem { topPadding: Math.round(swipeView.height * 0.2) bottomPadding: PlasmaCore.Units.largeSpacing implicitWidth: favouritesList.width + background: Rectangle { + color: 'transparent' + TapHandler { onLongPressed: root.openConfigure() } // open wallpaper menu when held on click + } contentItem: Clock {} } @@ -77,6 +84,11 @@ Item { height: visible ? favouritesList.delegateHeight : 0 } + // open wallpaper menu when held on click + TapHandler { + onLongPressed: root.openConfigure() + } + ColumnLayout { id: placeholder spacing: PlasmaCore.Units.gridUnit diff --git a/containments/homescreens/halcyon/package/contents/ui/main.qml b/containments/homescreens/halcyon/package/contents/ui/main.qml index f4b83181..32ee3c78 100644 --- a/containments/homescreens/halcyon/package/contents/ui/main.qml +++ b/containments/homescreens/halcyon/package/contents/ui/main.qml @@ -30,7 +30,7 @@ MobileShell.HomeScreen { Rectangle { id: darkenBackground - color: homescreen.page == 1 ? Qt.rgba(0, 0, 0, 0.7) : Qt.rgba(0, 0, 0, 0.2) + color: root.overlayShown ? 'transparent' : (homescreen.page == 1 ? Qt.rgba(0, 0, 0, 0.7) : Qt.rgba(0, 0, 0, 0.2)) anchors.fill: parent z: -1 Behavior on color {