Skip to content

Commit 099fb8a

Browse files
18202781743deepin-bot[bot]
authored andcommitted
fix: replace NumberAnimation with XAnimator in notification bubble
The change replaces NumberAnimation with XAnimator for the notification bubble transition animation. XAnimator is more efficient for animating x-position changes as it's specifically designed for this purpose and can leverage hardware acceleration. This improves performance and makes the animation smoother, especially when multiple notifications appear in quick succession. The duration and easing type remain the same to maintain consistent visual behavior. fix: 在通知气泡中用 XAnimator 替换 NumberAnimation 此次更改将通知气泡的过渡动画从 NumberAnimation 替换为 XAnimator。 XAnimator 专门用于处理 x 轴位置变化的动画,能更好地利用硬件加速,从而提 高性能并使动画更加流畅,特别是在快速连续出现多个通知时。保持相同的持续时 间和缓动类型以确保视觉行为一致。 pms: BUG-297317
1 parent f9e204b commit 099fb8a

File tree

1 file changed

+1
-1
lines changed
  • panels/notification/bubble/package

1 file changed

+1
-1
lines changed

panels/notification/bubble/package/main.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Window {
7070
verticalLayoutDirection: ListView.BottomToTop
7171
add: Transition {
7272
id: addTrans
73-
NumberAnimation { properties: "x"; from: addTrans.ViewTransition.item.width; duration: 600; easing.type: Easing.OutExpo }
73+
XAnimator { target: addTrans.ViewTransition.item; from: addTrans.ViewTransition.item.width; duration: 600; easing.type: Easing.OutExpo }
7474
}
7575
delegate: Bubble {
7676
width: 360

0 commit comments

Comments
 (0)