notification count pop animation

This commit is contained in:
Damocles 2026-04-12 17:12:33 +02:00
parent 5de09fd5e2
commit 8d074af824

View file

@ -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