mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
homescreens/halcyon: Fix wallpaper menu not being opened in certain tap areas
This commit is contained in:
parent
e4f5b54dde
commit
d158549525
2 changed files with 21 additions and 9 deletions
|
|
@ -28,6 +28,12 @@ Item {
|
||||||
favouritesList.contentY = favouritesList.originY;
|
favouritesList.contentY = favouritesList.originY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openConfigure() {
|
||||||
|
console.log('triggered')
|
||||||
|
plasmoid.action("configure").trigger();
|
||||||
|
plasmoid.editMode = false;
|
||||||
|
}
|
||||||
|
|
||||||
QQC2.SwipeView {
|
QQC2.SwipeView {
|
||||||
id: swipeView
|
id: swipeView
|
||||||
opacity: 1 - searchWidget.openFactor
|
opacity: 1 - searchWidget.openFactor
|
||||||
|
|
@ -43,6 +49,11 @@ Item {
|
||||||
height: swipeView.height
|
height: swipeView.height
|
||||||
width: swipeView.width
|
width: swipeView.width
|
||||||
|
|
||||||
|
// open wallpaper menu when held on click
|
||||||
|
TapHandler {
|
||||||
|
onLongPressed: root.openConfigure()
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: favouritesList
|
id: favouritesList
|
||||||
clip: true
|
clip: true
|
||||||
|
|
@ -53,20 +64,16 @@ Item {
|
||||||
anchors.leftMargin: Math.round(parent.width * 0.1)
|
anchors.leftMargin: Math.round(parent.width * 0.1)
|
||||||
anchors.rightMargin: 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
|
model: Halcyon.PinnedModel
|
||||||
header: MobileShell.BaseItem {
|
header: MobileShell.BaseItem {
|
||||||
topPadding: Math.round(swipeView.height * 0.2)
|
topPadding: Math.round(swipeView.height * 0.2)
|
||||||
bottomPadding: PlasmaCore.Units.largeSpacing
|
bottomPadding: PlasmaCore.Units.largeSpacing
|
||||||
implicitWidth: favouritesList.width
|
implicitWidth: favouritesList.width
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
color: 'transparent'
|
||||||
|
TapHandler { onLongPressed: root.openConfigure() } // open wallpaper menu when held on click
|
||||||
|
}
|
||||||
contentItem: Clock {}
|
contentItem: Clock {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -77,6 +84,11 @@ Item {
|
||||||
height: visible ? favouritesList.delegateHeight : 0
|
height: visible ? favouritesList.delegateHeight : 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open wallpaper menu when held on click
|
||||||
|
TapHandler {
|
||||||
|
onLongPressed: root.openConfigure()
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: placeholder
|
id: placeholder
|
||||||
spacing: PlasmaCore.Units.gridUnit
|
spacing: PlasmaCore.Units.gridUnit
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ MobileShell.HomeScreen {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: darkenBackground
|
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
|
anchors.fill: parent
|
||||||
z: -1
|
z: -1
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue