From 9a7cf1242d296dbdb9c03df48ab09054960295aa Mon Sep 17 00:00:00 2001 From: Leander Scherer Date: Mon, 18 May 2026 21:48:24 +0200 Subject: feat(quickshell): basic bar, tray, notification --- .../system/quickshell/NotificationPopupList.qml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 modules/system/quickshell/NotificationPopupList.qml (limited to 'modules/system/quickshell/NotificationPopupList.qml') diff --git a/modules/system/quickshell/NotificationPopupList.qml b/modules/system/quickshell/NotificationPopupList.qml new file mode 100644 index 0000000..6b9280b --- /dev/null +++ b/modules/system/quickshell/NotificationPopupList.qml @@ -0,0 +1,75 @@ +import QtQuick +import Quickshell +import Quickshell.Wayland + +PanelWindow { + id: root + property var popupModel + + signal actionInvoked(int id, string identifier) + signal replySent(int id, string text) + signal dismissed(int id) + signal activated(int id) + signal hideRequested(int id) + + visible: popupList.count > 0 + + anchors { top: true; right: true } + WlrLayershell.margins.top: Theme.barHeight + exclusionMode: ExclusionMode.Ignore + color: "transparent" + + readonly property int edgeMargin: 12 + readonly property int animationSafeMargin: 80 + readonly property int popupWidth: 400 + + implicitWidth: popupWidth + edgeMargin * 2 + animationSafeMargin + implicitHeight: popupList.contentHeight + edgeMargin * 2 + + WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand + + ListView { + id: popupList + anchors { + top: parent.top + right: parent.right + topMargin: edgeMargin + rightMargin: edgeMargin + } + + width: popupWidth + height: contentHeight + spacing: 8 + model: root.popupModel + interactive: false + clip: false + + delegate: NotificationCard { + onActionInvoked: (id, identifier) => root.actionInvoked(id, identifier) + onReplySent: (id, text) => root.replySent(id, text) + onDismissed: id => root.dismissed(id) + onActivated: id => root.activated(id) + onHideRequested: id => root.hideRequested(id) + } + + add: Transition { + ParallelAnimation { + NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 250; easing.type: Easing.OutSine } + NumberAnimation { property: "x"; from: popupWidth + edgeMargin; duration: 350; easing.type: Easing.OutBack } + } + } + + remove: Transition { + ParallelAnimation { + NumberAnimation { property: "opacity"; from: 1; to: 0; duration: 200; easing.type: Easing.InSine } + NumberAnimation { property: "x"; to: popupWidth + edgeMargin; duration: 200; easing.type: Easing.InSine } + } + } + + displaced: Transition { + NumberAnimation { properties: "x,y"; duration: 250; easing.type: Easing.OutSine } + } + } +} + + -- cgit v1.3.1