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