fix: fix notification bubble animation glitch#1537
fix: fix notification bubble animation glitch#1537deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the notification bubble list add animation to use standard Qt Quick PropertyAnimation transitions, and adds a dedicated addDisplaced transition to smoothly reposition existing bubbles when new notifications are inserted, removing the previous manual ScriptAction hack that caused glitches. Sequence diagram for updated notification bubble add animationsequenceDiagram
actor User
participant App
participant NotificationModel
participant bubbleView
participant addTrans
participant addDisplacedTrans
User->>App: Triggers event that creates notification
App->>NotificationModel: appendNotification()
NotificationModel-->>bubbleView: modelUpdated (new item)
bubbleView->>addTrans: start add Transition
activate addTrans
addTrans->>addTrans: PropertyAnimation on item.x
addTrans-->>bubbleView: item slides in from width to 0
deactivate addTrans
bubbleView->>addDisplacedTrans: start addDisplaced Transition
activate addDisplacedTrans
addDisplacedTrans->>addDisplacedTrans: PropertyAnimation on displaced items x
addDisplacedTrans-->>bubbleView: existing bubbles reposition smoothly
deactivate addDisplacedTrans
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
|
||
| int targetWidth = m_window->width(); | ||
| int targetHeight = m_window->height(); | ||
| if (m_dlayerShellWindow->geometryManagedByBackend()) { |
There was a problem hiding this comment.
geometryManagedByBackend 这个属性应该可以不用外面设置吧,当存在preferredWidth这些的时候,取preferredWidth, 这个逻辑可以封装到layershell内部,跟qt类似,
There was a problem hiding this comment.
wayland 我没有试过, 可能不存在这个问题. 所以这个属性暴露出来是为了就算是绑定了preferredWidth也可以选择不使用,是一种兼容性处理
9ea5674 to
93acc3d
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
TAG Bot New tag: 2.0.35 |
|
TAG Bot New tag: 2.0.36 |
1. Replaced the previous complex ScriptAction with a simpler PropertyAnimation for the add transition 2. Added a new addDisplaced transition to handle displaced items when new notifications are added 3. Removed the manual script that forced previous bubble animations to complete, which was causing visual glitches 4. Now uses standard Qt Quick transitions for smoother and more reliable animation behavior fix: 修复通知气泡动画显示问题 1. 将之前复杂的 ScriptAction 替换为更简单的 PropertyAnimation 来处理添加 动画 2. 新增 addDisplaced 过渡动画来处理新通知添加时其他气泡的位移 3. 移除了强制完成前一个气泡动画的手动脚本,该脚本会导致视觉故障 4. 现在使用标准的 Qt Quick 过渡动画来实现更平滑可靠的动画效果 PMS: BUG-355029
|
/forcemerge |
|
This pr force merged! (status: blocked) |
fix: 修复通知气泡动画显示问题
PMS: BUG-355029
Summary by Sourcery
Simplify and standardize notification bubble list transitions to fix animation glitches when new notifications are added.
Bug Fixes:
Enhancements: