aboutsummaryrefslogtreecommitdiffstats
path: root/notifications/NotificationBalloon.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-23 15:12:33 +0200
committerDanilo M. <danix@danix.xyz>2026-10-23 15:12:33 +0200
commit237e919e8807cd50856a493533b32cb0a06ae88c (patch)
tree047eb5c0acd177c621ec997cc0968120f2df2845 /notifications/NotificationBalloon.qml
parent9d576a078bda7bc4ea2922e152c2431a526e65f2 (diff)
downloadquickshell-237e919e8807cd50856a493533b32cb0a06ae88c.tar.gz
quickshell-237e919e8807cd50856a493533b32cb0a06ae88c.zip
notifications: each balloon slides in from its screen edge
The balloon window is one layer surface for the whole stack and stays mapped while any balloon is queued, so Hyprland's layer animation only ever played for the first one; the rest just appeared. Each balloon now animates its own x in from the side its corner sits against. The window clips it, so it enters from the stack's edge, 12 px inside the screen's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'notifications/NotificationBalloon.qml')
-rw-r--r--notifications/NotificationBalloon.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/notifications/NotificationBalloon.qml b/notifications/NotificationBalloon.qml
index b5af3ab..a82f5f6 100644
--- a/notifications/NotificationBalloon.qml
+++ b/notifications/NotificationBalloon.qml
@@ -27,6 +27,21 @@ Rectangle {
property var borderColors: []
property real borderAngle: 0
+ // Slides in from the screen edge it sits against. The layer surface maps
+ // once for the whole stack, so a Hyprland layer animation would only
+ // play for the first balloon. The window clips it, so it appears from
+ // the stack's edge rather than from beyond the screen's.
+ transform: Translate { id: slide }
+ NumberAnimation {
+ id: enter
+ target: slide; property: "x"; duration: 260; easing.type: Easing.OutCubic
+ to: 0
+ }
+ Component.onCompleted: {
+ enter.from = Notify.config.balloons.corner.endsWith("left") ? -b.width - 12 : b.width + 12;
+ enter.start();
+ }
+
// Driven by the shell's tick. The balloon drops itself once its expiry
// passes, or while a suppression says so: the drawer and snooze withhold
// everything; a muted app and DND are config.json's call (DND passes