Repository navigation
Conversation
1. Root cause: DTK.FloatingPanel uses ItemViewport internally which generates a low-resolution corner mask texture with Nearest sampling and no anti-aliasing, producing visible jagged edges on rounded corners 2. Fix: replace FloatingPanel with a custom background using Rectangle (radius: 18) whose corners are rendered by Qt Quick GPU pipeline with native anti-aliasing, plus DTK.BoxShadow for projection and a border Rectangle for the outline 3. Impact: only EditToolbar background rendering changes; corners are now smooth. DTK.InWindowBlur is not used to avoid the known DTK bug (see ReName.qml:45) and unnecessary GPU overhead Log: 修复图片编辑工具栏圆角锯齿问题 Influence: 1. Test edit toolbar corner smoothness when zooming images in/out 2. Verify toolbar shadow and background tint render correctly 3. Confirm no visual regression on toolbar appearance fix: 修复图片编辑工具栏圆角锯齿问题 1. 根因:DTK.FloatingPanel 内部使用 ItemViewport 生成低分辨率圆角遮罩 纹理,采用 Nearest 采样且未开启抗锯齿,导致圆角边缘出现明显锯齿 2. 方案:将 FloatingPanel 替换为自定义背景,使用 Rectangle(radius: 18) 实现圆角,Rectangle 圆角由 Qt Quick GPU 管线原生抗锯齿渲染;保留 DTK.BoxShadow 投影和边框 Rectangle 3. 影响:仅 EditToolbar 背景渲染方式变化,圆角变得平滑;不使用 DTK.InWindowBlur 以规避已知 DTK bug(见 ReName.qml:45)及多余 GPU 开销 Log: 修复图片编辑工具栏圆角锯齿问题 Influence: 1. 测试图片放大缩小后工具栏圆角是否平滑无锯齿 2. 验证工具栏投影和背景色渲染正常 3. 确认工具栏外观无视觉回归 PMS: BUG-381163
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JWWTSL 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 |
Reviewer's GuideThe edit toolbar background is reimplemented with GPU-rendered rounded Rectangles, a preserved DTK.BoxShadow, and an explicit border, eliminating the low-resolution anti-aliased corner artifacts from DTK.FloatingPanel without changing toolbar behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: ['建议将圆角半径 18 提取为自定义属性(如 property int cornerRadius: 18),BoxShadow 的 cornerRadius 和两个 Rectangle 的 radius 统一引用该属性,避免多处硬编码同一值导致修改不一致。'] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: ['将 18 提取为 property int cornerRadius: 18,BoxShadow 与两个 Rectangle 统一引用', '将常用样式参数集中定义为属性组,便于主题切换和统一调整'] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 建议将魔法数字提取为属性,提高可维护性
DTK.Control {
// 统一定义样式参数
property int cornerRadius: 18
property real bgAlpha: 0.72
property real shadowAlpha: 0.24
property real borderAlpha: 0.12
background: Item {
Accessible.ignored: true
implicitHeight: editToolbar.implicitHeight
DTK.BoxShadow {
anchors.fill: parent
cornerRadius: editToolbar.cornerRadius
hollow: true
shadowBlur: 20
shadowColor: Qt.rgba(editToolbar.palette.shadow.r,
editToolbar.palette.shadow.g,
editToolbar.palette.shadow.b, editToolbar.shadowAlpha)
shadowOffsetY: 6
}
Rectangle {
anchors.fill: parent
radius: editToolbar.cornerRadius
color: Qt.rgba(editToolbar.palette.window.r,
editToolbar.palette.window.g,
editToolbar.palette.window.b, editToolbar.bgAlpha)
}
Rectangle {
anchors.fill: parent
radius: editToolbar.cornerRadius
color: "transparent"
border.color: Qt.rgba(editToolbar.themeTextColor.r,
editToolbar.themeTextColor.g,
editToolbar.themeTextColor.b, editToolbar.borderAlpha)
border.width: 1
}
}
}本报告由 AI 代码审查工具自动生成 |
fix: eliminate jagged corners on edit toolbar background
generates a low-resolution corner mask texture with Nearest sampling
and no anti-aliasing, producing visible jagged edges on rounded corners
(radius: 18) whose corners are rendered by Qt Quick GPU pipeline with
native anti-aliasing, plus DTK.BoxShadow for projection and a border
Rectangle for the outline
smooth. DTK.InWindowBlur is not used to avoid the known DTK bug (see
ReName.qml:45) and unnecessary GPU overhead
Log: 修复图片编辑工具栏圆角锯齿问题
Influence:
fix: 修复图片编辑工具栏圆角锯齿问题
纹理,采用 Nearest 采样且未开启抗锯齿,导致圆角边缘出现明显锯齿
实现圆角,Rectangle 圆角由 Qt Quick GPU 管线原生抗锯齿渲染;保留
DTK.BoxShadow 投影和边框 Rectangle
DTK.InWindowBlur 以规避已知 DTK bug(见 ReName.qml:45)及多余 GPU 开销
Log: 修复图片编辑工具栏圆角锯齿问题
Influence:
PMS: BUG-381163
Summary by Sourcery
Improve edit toolbar background rendering to provide smooth rounded corners without changing its visual styling.
Bug Fixes:
Enhancements: