fix(icons): restore smooth scaling to prevent jagged icon edges#583
fix(icons): restore smooth scaling to prevent jagged icon edges#583deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves an explicit smooth=false setting from the DQuickDciIconImage constructor so that the underlying QQuickImage can use smooth scaling again, restoring anti-aliased icon edges when scaled. Sequence diagram for smooth property propagation in DQuickDciIconImagesequenceDiagram
participant Client
participant DQuickDciIconImage as DQuickDciIconImage
participant DQuickDciIconImagePrivate as Private
participant QQuickImage as ImageItem
Client->>DQuickDciIconImage: DQuickDciIconImage(parent)
activate DQuickDciIconImage
DQuickDciIconImage->>Private: create d
Private->>ImageItem: create imageItem
DQuickDciIconImage->>ImageItem: connect implicitWidthChanged
DQuickDciIconImage->>ImageItem: connect implicitHeightChanged
DQuickDciIconImage->>ImageItem: connect smoothChanged_to_setSmooth
deactivate DQuickDciIconImage
Client->>DQuickDciIconImage: setSmooth(true)
DQuickDciIconImage-->>Client: smoothChanged(true)
DQuickDciIconImage->>ImageItem: setSmooth(true)
Class diagram for DQuickDciIconImage smooth scaling behaviorclassDiagram
class DQuickDciIconImage {
+DQuickDciIconImage(parent: QQuickItem*)
+bool smooth
+smoothChanged(smooth: bool)
}
class DQuickDciIconImagePrivate {
+QQuickImage* imageItem
}
class QQuickImage {
+setSmooth(smooth: bool)
+implicitWidthChanged()
+implicitHeightChanged()
}
DQuickDciIconImage --> DQuickDciIconImagePrivate : has_d
DQuickDciIconImagePrivate --> QQuickImage : has_imageItem
DQuickDciIconImage ..> QQuickImage : smoothChanged_to_setSmooth
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Restore smooth=true behavior to avoid jagged edges when icons are scaled. 恢复平滑缩放以修复图标放大时圆角显示锯齿的问题。 Log: 恢复 DQuickDciIconImage 平滑缩放 PMS: BUG-308655 Influence: 修复 QML 中 DCI 图标放大时圆角显示锯齿的问题,图标边缘更平滑。
deepin pr auto review这段代码是关于 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
总结与改进建议总结: 改进建议:
结论:如果产品需求是图标默认开启抗锯齿以获得更好的视觉效果,那么此修改是正确的。如果是为了保持像素图的锐利度或遵循旧有的设计规范,建议撤销此修改。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, re2zero 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: unstable) |
Restore smooth=true behavior to avoid jagged edges when icons are scaled.
恢复平滑缩放以修复图标放大时圆角显示锯齿的问题。
Log: 恢复 DQuickDciIconImage 平滑缩放
PMS: BUG-308655
Influence: 修复 QML 中 DCI 图标放大时圆角显示锯齿的问题,图标边缘更平滑。
Summary by Sourcery
Bug Fixes: