Keep the notification centre below the bar
This commit is contained in:
1 parent
18a6ed93b5
commit
d8df9fa320
2 files changed
+9
-2
No files matched your search
+2
-1
@@ -55,7 +55,8 @@ accent colour. The Wallpaper tile opens `blob.displays`, the Theme tile opens
|
|||||||
|
|
||||||
## Notification centre
|
## 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
|
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
|
deleted instead, so the centre only holds what you missed. The x on an entry
|
||||||
removes it through `blob-shell notifications remove <file>`, the bell button
|
removes it through `blob-shell notifications remove <file>`, the bell button
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ Item {
|
|||||||
property bool doNotDisturb: false
|
property bool doNotDisturb: false
|
||||||
readonly property bool empty: root.entries.length === 0
|
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) {
|
function open(payloadJson) {
|
||||||
root.opened = true
|
root.opened = true
|
||||||
root.refresh()
|
root.refresh()
|
||||||
@@ -114,7 +120,7 @@ Item {
|
|||||||
Card {
|
Card {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.topMargin: Style.spaceReal(10)
|
anchors.topMargin: Style.spaceReal(10) + root.barInset
|
||||||
anchors.rightMargin: Style.spaceReal(10)
|
anchors.rightMargin: Style.spaceReal(10)
|
||||||
implicitWidth: Style.spaceReal(440)
|
implicitWidth: Style.spaceReal(440)
|
||||||
implicitHeight: Style.spaceReal(420)
|
implicitHeight: Style.spaceReal(420)
|
||||||
|
|||||||
Reference in new issue
Block a user