From a61ad3e7b99e2cebabefc51ffbce73aabdccbc34 Mon Sep 17 00:00:00 2001 From: lucy Date: Fri, 28 Aug 2026 19:27:27 +0200 Subject: [PATCH] fixup layering --- modules/applets/VolPopup.qml | 4 ++ modules/applets/WallPicker.qml | 4 ++ modules/overlays/#Top.qml# | 101 +++++++++++++++++++++++++++++++++ modules/overlays/.#Top.qml | 1 + modules/overlays/Top.qml | 6 +- settings/settings.json | 4 +- 6 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 modules/overlays/#Top.qml# create mode 120000 modules/overlays/.#Top.qml diff --git a/modules/applets/VolPopup.qml b/modules/applets/VolPopup.qml index 0b58361..38424e7 100644 --- a/modules/applets/VolPopup.qml +++ b/modules/applets/VolPopup.qml @@ -16,6 +16,10 @@ Rectangle { radius: Config.cfg.appearance.rounding implicitWidth: audioLayout.implicitWidth + 10 implicitHeight: audioLayout.implicitHeight + 10 + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.AllButtons + } ColumnLayout { id: audioLayout diff --git a/modules/applets/WallPicker.qml b/modules/applets/WallPicker.qml index f7504ce..7557cf9 100644 --- a/modules/applets/WallPicker.qml +++ b/modules/applets/WallPicker.qml @@ -9,6 +9,10 @@ import qs.settings Rectangle { id: wallPicker color: "transparent" + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.AllButtons + } Rectangle { id: container anchors.fill: parent diff --git a/modules/overlays/#Top.qml# b/modules/overlays/#Top.qml# new file mode 100644 index 0000000..348760f --- /dev/null +++ b/modules/overlays/#Top.qml# @@ -0,0 +1,101 @@ +import QtQuick +import Quickshell +import Quickshell.Wayland +import qs.modules.Services +import qs.modules.applets +import qs.settings + +Variants { + model: Quickshell.screens + delegate: PanelWindow { + id: root + required property ShellScreen modelData + property bool shown: WidgetTracker.current !== "" && WidgetTracker.screen === modelData + + screen: modelData + anchors { + top: true + left: true + bottom: true + right: true + } + exclusionMode: ExclusionMode.Ignore + color: 'transparent' + visible: true + mask: Region { + item: root.shown ? dismisser : null + } + WlrLayershell.keyboardFocus: shown ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None + Item { + anchors.fill: parent + focus: true + Keys.onEscapePressed: event => { + WidgetTracker.close(); + event.accepted = true; + } + VolPopup { + id: volPopup + z: 1 + property bool shown: root.shown && WidgetTracker.current === "volume" + opacity: shown ? 1 : 0 + visible: opacity > 0 + anchors.right: parent.right + anchors.top: parent.top + anchors.topMargin: Config.cfg.bar.floating ? Config.cfg.bar.height + 20 : Config.cfg.bar.height + anchors.rightMargin: 10 + Behavior on opacity { + NumberAnimation { + duration: 140 + easing.type: Easing.OutCubic + } + } + transform: Translate { + y: volPopup.shown ? 0 : -12 + Behavior on y { + NumberAnimation { + duration: 140 + easing.type: Easing.OutCubic + } + } + } + } + WallPicker { + id: wallpapers + z: 1 + property bool shown: root.shown && WidgetTracker.current === "wallpapers" + opacity: shown ? 1 : 0 + visible: opacity > 0 + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 20 + implicitWidth: 1000 + implicitHeight: 200 + + + Behavior on opacity { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + transform: Translate { + y: wallpapers.shown ? 0 : 12 + Behavior on y { + NumberAnimation { + duration: 200 + easing.type: Easing.OutCubic + } + } + } + } + MouseArea { + id: dismisser + z: 0 + anchors.fill: parent + acceptedButtons: Qt.LeftButton + onClicked: WidgetTracker.close() + } + } + } +} diff --git a/modules/overlays/.#Top.qml b/modules/overlays/.#Top.qml new file mode 120000 index 0000000..da89f8e --- /dev/null +++ b/modules/overlays/.#Top.qml @@ -0,0 +1 @@ +lucy@nerv.13460:1787927060 \ No newline at end of file diff --git a/modules/overlays/Top.qml b/modules/overlays/Top.qml index 183d3a9..1c8d931 100644 --- a/modules/overlays/Top.qml +++ b/modules/overlays/Top.qml @@ -28,7 +28,7 @@ Variants { WlrLayershell.keyboardFocus: shown ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None Item { anchors.fill: parent - focus: true + focus: true Keys.onEscapePressed: event => { WidgetTracker.close(); event.accepted = true; @@ -71,6 +71,10 @@ Variants { anchors.margins: 20 implicitWidth: 1000 implicitHeight: 200 + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.AllButtons + } Behavior on opacity { NumberAnimation { diff --git a/settings/settings.json b/settings/settings.json index aed29ed..f61e9a1 100644 --- a/settings/settings.json +++ b/settings/settings.json @@ -2,7 +2,7 @@ "appearance": { "font": "Iosevka", "fontSize": 14, - "iconSize": 22, + "iconSize": 14, "rounding": 16 }, "bar": { @@ -12,6 +12,6 @@ }, "wallpaper": { "wallDir": "/home/lucy/.walls/", - "wallpaper": "/home/lucy/.walls/walkingcastle.png" + "wallpaper": "/home/lucy/.walls/frierensuff.png" } }