fix: prevent animation glitch during task text width changes#1464
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom Mar 3, 2026
Merged
fix: prevent animation glitch during task text width changes#1464deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
18202781743
previously approved these changes
Mar 2, 2026
18202781743
reviewed
Mar 2, 2026
BLumia
requested changes
Mar 2, 2026
1. Fixed animation glitch that occurred when task item text width changed dynamically 2. Added onOptimalSingleTextWidthChanged handler to temporarily disable and re-enable animations 3. Created displacedTransition ID for proper animation reference 4. Used Qt.callLater to ensure smooth transition restoration Log: Fixed taskbar animation glitches when application names change width Influence: 1. Test taskbar behavior when application names change (e.g., language switching) 2. Verify smooth animations when dragging task items 3. Check that text width changes don't cause visual artifacts 4. Test with applications that have varying name lengths 5. Verify task grouping and overflow functionality remains intact fix: 修复任务文本宽度变化时的动画故障 1. 修复了任务项文本宽度动态变化时出现的动画故障 2. 添加了onOptimalSingleTextWidthChanged处理程序,临时禁用并重新启用动画 3. 创建了displacedTransition ID以便正确引用动画 4. 使用Qt.callLater确保平滑恢复过渡效果 Log: 修复了应用程序名称宽度变化时的任务栏动画故障 Influence: 1. 测试应用程序名称变化时的任务栏行为(如语言切换) 2. 验证拖动任务项时的平滑动画效果 3. 检查文本宽度变化不会导致视觉伪影 4. 测试具有不同名称长度的应用程序 5. 验证任务分组和溢出功能保持正常 目前需要修复:拆分后,remove的时候动画显示需要进行修复,目前由于卡图标重叠以及图标间距卡顿问题,主要由于X,Y动画卡主引起,从而去除里相应的remove和add的displace的动画。
deepin pr auto review这段代码主要涉及 QML 中 ListView 的动画过渡效果优化,旨在改善任务栏图标在添加、删除或移动时的视觉体验。以下是对这段代码的详细审查和改进建议: 1. 语法逻辑审查
2. 代码质量
3. 代码性能
4. 代码安全
5. 具体的改进代码示例针对代码格式和逻辑清晰度,建议对 // ... 其他代码保持不变 ...
onOptimalSingleTextWidthChanged: {
// 临时禁用过渡以强制刷新状态
appContainer.addDisplaced = null
appContainer.removeDisplaced = null
// 使用 Qt.callLater 确保在下一帧恢复过渡,避免属性绑定冲突
Qt.callLater(function() {
appContainer.addDisplaced = addDisplacedTransition
appContainer.removeDisplaced = removeDisplacedTransition
})
}
// ... 其他代码保持不变 ...总结这段代码的主要目的是优化 ListView 的视觉反馈,通过分离 总体评价:代码逻辑正确,能够达到预期效果。主要改进点在于清理代码格式(去除多余空格),并确认频繁重置 Transition 是否存在性能瓶颈。从安全角度看,没有明显风险。 |
BLumia
approved these changes
Mar 3, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, wjyrich 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 |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: behind) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log: Fixed taskbar animation glitches when application names change width
Influence:
fix: 修复任务文本宽度变化时的动画故障
Log: 修复了应用程序名称宽度变化时的任务栏动画故障
Influence:
目前需要修复:拆分后,remove的时候动画显示需要进行修复,目前由于卡图标重叠以及图标间距卡顿问题,主要由于X,Y动画卡主引起,从而去除里相应的remove和add的displace的动画。
PMS: BUG-343403