From ccd345641688d4566f743d8cc3677691b913e08b Mon Sep 17 00:00:00 2001 From: inorishio Date: Tue, 7 Oct 2025 17:41:57 +0200 Subject: [PATCH] Dragarea + swap layer top>bottom --- shell.qml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/shell.qml b/shell.qml index 604c7be..b46bab1 100755 --- a/shell.qml +++ b/shell.qml @@ -11,13 +11,25 @@ PanelWindow { implicitWidth: screen.width implicitHeight: screen.height + property bool onTop: true + + function toggleLayer() { + if (onTop) { + WlrLayershell.layer = WlrLayer.Bottom + onTop = false + } else { + WlrLayershell.layer = WlrLayer.Top + onTop = true + } + } + ListModel { id: petModels ListElement { width: 320; height: 293; - x: 200; - y: 200; + x: 0; + y: 1124; source: "./Gifs/evernight.gif" } } @@ -39,6 +51,12 @@ PanelWindow { MouseArea { anchors.fill: parent drag.target: parent + acceptedButtons: Qt.LeftButton | Qt.MiddleButton + onClicked: (mouse) => { + if (mouse.button === Qt.MiddleButton) { + mainWindow.toggleLayer() + } + } } } }