From 8d074af824c2e20c927dbcf0b2d849e3438a2bf2 Mon Sep 17 00:00:00 2001 From: Damocles Date: Sun, 12 Apr 2026 17:12:33 +0200 Subject: [PATCH] notification count pop animation --- modules/Notifications.qml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/Notifications.qml b/modules/Notifications.qml index 6ab70ae..48017e4 100644 --- a/modules/Notifications.qml +++ b/modules/Notifications.qml @@ -48,11 +48,27 @@ M.BarSection { anchors.verticalCenter: parent.verticalCenter } M.BarLabel { + id: countLabel label: root.count > 0 ? String(root.count) : "" color: M.Theme.base0D anchors.verticalCenter: parent.verticalCenter + + transform: Scale { + id: countScale + origin.x: countLabel.width / 2 + origin.y: countLabel.height / 2 + xScale: 1; yScale: 1 + } + + SequentialAnimation { + id: popAnim + NumberAnimation { target: countScale; properties: "xScale,yScale"; to: 1.4; duration: 100; easing.type: Easing.OutQuad } + NumberAnimation { target: countScale; properties: "xScale,yScale"; to: 1.0; duration: 200; easing.type: Easing.OutElastic } + } } + onCountChanged: if (count > 0) popAnim.start() + TapHandler { acceptedButtons: Qt.LeftButton cursorShape: Qt.PointingHandCursor