move notifications to top overlay
This commit is contained in:
parent
90b3cc22e2
commit
021c82f438
12 changed files with 106 additions and 172 deletions
|
|
@ -4,6 +4,7 @@ import Quickshell.Wayland
|
|||
import qs.modules.Services
|
||||
import qs.modules.applets
|
||||
import qs.settings
|
||||
import qs.modules.notifications
|
||||
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
|
@ -23,7 +24,12 @@ Variants {
|
|||
color: 'transparent'
|
||||
visible: true
|
||||
mask: Region {
|
||||
item: root.shown ? dismisser : null
|
||||
Region {
|
||||
item: notiList.visible ? notiList : null
|
||||
}
|
||||
Region {
|
||||
item: root.shown ? dismisser : null
|
||||
}
|
||||
}
|
||||
WlrLayershell.keyboardFocus: shown ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
|
||||
Item {
|
||||
|
|
@ -41,7 +47,7 @@ Variants {
|
|||
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.topMargin: Config.cfg.bar.floating ? Config.cfg.bar.height + 20 : Config.cfg.bar.height + 10
|
||||
anchors.rightMargin: 10
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
|
|
@ -59,6 +65,27 @@ Variants {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: notiList
|
||||
z: 2
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: Config.cfg.bar.height + 10 + (Config.cfg.bar.floating ? 10 : 0)
|
||||
anchors.rightMargin: 10
|
||||
width: root.modelData.width / 6
|
||||
height: contentHeight
|
||||
interactive: false
|
||||
visible: count > 0 && Compositor.focusedScreen === root.modelData
|
||||
|
||||
model: NotiServer.notifications
|
||||
spacing: 6
|
||||
delegate: NotiCard {
|
||||
required property var modelData
|
||||
nScreen: root.modelData
|
||||
notification: modelData
|
||||
}
|
||||
}
|
||||
WallPicker {
|
||||
id: wallpapers
|
||||
z: 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue