simplify things by moving popups into a new layer

This commit is contained in:
lucy 2026-08-28 17:45:45 +02:00
commit 4410d41fb3
10 changed files with 223 additions and 199 deletions

View file

@ -0,0 +1,27 @@
import Quickshell.Wayland
import Quickshell
import QtQuick
import qs.settings
Variants {
model: Quickshell.screens
delegate: WlrLayershell {
id: root
layer: WlrLayer.Background
required property ShellScreen modelData
screen: modelData
exclusionMode: ExclusionMode.Ignore
anchors {
top: true
bottom: true
left: true
right: true
}
Image {
cache: false
anchors.fill: parent
source: Qt.resolvedUrl(Config.cfg.wallpaper.wallpaper)
}
}
}

58
modules/overlays/Top.qml Normal file
View file

@ -0,0 +1,58 @@
import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.modules.Services
import qs.modules.applets
import qs.settings
Variants {
model: Quickshell.screens
delegate: PanelWindow {
required property ShellScreen modelData
aboveWindows: true
screen: modelData
anchors {
top: true
left: true
bottom: true
right: true
}
exclusionMode: ExclusionMode.Ignore
color: 'transparent'
visible: WidgetTracker.current !== "" && WidgetTracker.screen === modelData
WlrLayershell.keyboardFocus: visible ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
Item {
anchors.fill: parent
focus: true
Keys.onEscapePressed: event => {
WidgetTracker.close();
event.accepted = true;
}
VolPopup {
z: 1
visible: WidgetTracker.current === "volume"
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
}
WallPicker {
z: 1
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 20
implicitWidth: 1000
implicitHeight: 200
visible: WidgetTracker.current === "wallpapers"
}
MouseArea {
z: 0
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: WidgetTracker.close()
}
}
}
}