diff options
Diffstat (limited to 'modules/notifications')
| -rw-r--r-- | modules/notifications/Content.qml | 7 | ||||
| -rw-r--r-- | modules/notifications/Wrapper.qml | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/modules/notifications/Content.qml b/modules/notifications/Content.qml index 108f8d3..701e245 100644 --- a/modules/notifications/Content.qml +++ b/modules/notifications/Content.qml @@ -8,6 +8,8 @@ import QtQuick Item { id: root + required property PersistentProperties visibilities + required property Item panel readonly property int padding: Appearance.padding.large anchors.top: parent.top @@ -24,9 +26,6 @@ Item { for (let i = 0; i < count; i++) height += list.itemAtIndex(i)?.nonAnimHeight ?? 0; - const screen = QsWindow.window?.screen; - const visibilities = Visibilities.screens[screen]; - const panel = Visibilities.panels[screen]; if (visibilities && panel) { if (visibilities.osd) { const h = panel.osd.y - Config.border.rounding * 2; @@ -41,7 +40,7 @@ Item { } } - return Math.min((screen?.height ?? 0) - Config.border.thickness * 2, height + padding * 2); + return Math.min((QsWindow.window?.screen?.height ?? 0) - Config.border.thickness * 2, height + padding * 2); } ClippingWrapperRectangle { diff --git a/modules/notifications/Wrapper.qml b/modules/notifications/Wrapper.qml index 27b9219..12dedcf 100644 --- a/modules/notifications/Wrapper.qml +++ b/modules/notifications/Wrapper.qml @@ -1,14 +1,21 @@ import "root:/config" +import Quickshell import QtQuick Item { id: root + required property PersistentProperties visibilities + required property Item panel + visible: height > 0 implicitHeight: content.implicitHeight implicitWidth: content.implicitWidth Content { id: content + + visibilities: root.visibilities + panel: root.panel } } |