Repository navigation
fix(dock): enable smooth icon scaling only when scaled - #1822
Conversation
Reviewer's GuideUIEnable smooth filtering for the app icon while its animation root is active, improving rendering during scaling while keeping normal-size icons crisp.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="panels/dock/taskmanager/package/AppItem.qml" line_range="202" />
<code_context>
anchors.centerIn: parent
retainWhileLoading: true
- smooth: false
+ smooth: scale != 1.0
Loader {
</code_context>
<issue_to_address>
**Scaled icons look jagged**
When taskManager scales an ancestor during add/remove or overflow transitions, `scale` in `AppItem.qml` remains 1.0, so `smooth` stays false and icons render without smooth filtering.
Make the smoothing condition account for the scale applied by `delegateRoot` or `appItemRect`, not only the icon’s local `scale`.
</issue_to_address>
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: ['可选:浮点数用 != 直接比较在动画场景下可能因精度误差(如 0.9999999)短暂触发 smooth,若对极致性能敏感可考虑 qFuzzyCompare 或阈值比较,但当前实现已满足需求,非必须。'] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 当前实现已正确,无需修改。若追求动画精度稳健性,可写为: // smooth: !qFuzzyCompare(scale, 1.0) // 但当前 `smooth: scale != 1.0` 已满足需求,保持原样即可。本报告由 AI 代码审查工具自动生成 |
|
1. Change smooth property from false to animationRoot.active for app icons 2. Enables smooth rendering when icon is scaled, keeps crisp rendering at normal size 3. Improves icon visual quality during scaling in the dock task manager Log: Enable smooth icon scaling conditionally based on scale factor Influence: Dock icons render more smoothly when scaled. fix(dock): 仅在缩放时启用图标平滑处理 1. 将应用图标的 smooth 属性由 false 修改 为 animationRoot.active 2. 缩放时启用平滑渲染,正常尺寸下保持清晰渲染 3. 提升任务栏中图标缩放时的视觉质量 Log: 根据缩放比例条件启用图标平滑处理 Influence: 任务栏图标缩放时渲染更平滑。 PMS: BUG-383565
f7ebece to
7da3398
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, 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 |
|
/forcemerge |
|
This pr force merged! (status: behind) |
Log: Enable smooth icon scaling conditionally based on scale factor
Influence: Dock icons render more smoothly when scaled.
fix(dock): 仅在缩放时启用图标平滑处理
Log: 根据缩放比例条件启用图标平滑处理
Influence: 任务栏图标缩放时渲染更平滑。
PMS: BUG-383565
Summary by Sourcery
Bug Fixes: