From d8df9fa320024915777dff67d48c2b9b6421f932 Mon Sep 17 00:00:00 2001 From: Sir Blob Date: Thu, 24 Sep 2026 03:28:32 +0000 Subject: [PATCH] Keep the notification centre below the bar --- docs/widgets.md | 3 ++- shell/plugins/notification-center/NotificationCenter.qml | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/widgets.md b/docs/widgets.md index 31d957b..027a411 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -55,7 +55,8 @@ accent colour. The Wallpaper tile opens `blob.displays`, the Theme tile opens ## Notification centre -`blob.notification-center` lists the notification history, newest first. A +`blob.notification-center` lists the notification history, newest first. It +opens at the top right, just below the bar rather than over it. A toast that expires unseen moves into history; a toast you close or click is deleted instead, so the centre only holds what you missed. The x on an entry removes it through `blob-shell notifications remove `, the bell button diff --git a/shell/plugins/notification-center/NotificationCenter.qml b/shell/plugins/notification-center/NotificationCenter.qml index 59bc74b..99a27ed 100644 --- a/shell/plugins/notification-center/NotificationCenter.qml +++ b/shell/plugins/notification-center/NotificationCenter.qml @@ -20,6 +20,12 @@ Item { property bool doNotDisturb: false readonly property bool empty: root.entries.length === 0 + readonly property int barInset: { + var bar = root.shell ? root.shell.bar : null + if (!bar || bar.barHidden === true) return 0 + return Math.max(0, bar.barSize || 0) + } + function open(payloadJson) { root.opened = true root.refresh() @@ -114,7 +120,7 @@ Item { Card { anchors.top: parent.top anchors.right: parent.right - anchors.topMargin: Style.spaceReal(10) + anchors.topMargin: Style.spaceReal(10) + root.barInset anchors.rightMargin: Style.spaceReal(10) implicitWidth: Style.spaceReal(440) implicitHeight: Style.spaceReal(420)