Repository navigation
feat: add window blur control to DialogWindow - #713
Conversation
Reviewer's GuideIntroduces configurable behind-window blur for DialogWindow and uses it to optimize SettingsDialog, while refining its background, rounded-corner presentation, list clipping, and content layout padding. File-Level Changes
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="qt6/src/qml/settings/SettingsDialog.qml" line_range="63" />
<code_context>
top: control.top
}
- padding: DS.Style.settings.content.margin
+ height: Math.max(0, control.height - parent.y)
+ leftPadding: DS.Style.settings.content.margin
+ rightPadding: DS.Style.settings.content.margin
</code_context>
<issue_to_address>
**issue (bug_risk):** `contentBg.height` creates a binding loop: `DialogWindow.height` is bound to `content.height`, `content.height` is derived from its children's bounds, and `contentBg.height` is bound back to `control.height`. QML reports a binding loop and the settings content height becomes unstable or resolves incorrectly, causing the dialog layout to collapse or display at the wrong height.
**Triggers:** When SettingsDialog is instantiated and its window size is evaluated.
**Suggested fix:** Give the content view a height derived from an independent parent/content height, or establish an explicit dialog height without binding the child height back to `control.height`.
</issue_to_address>86ef9c7 to
fa29307
Compare
fa29307 to
73d72a6
Compare
| // DialogWindow sizes its content container from children. Keep its header/title | ||
| // offset via this marker while anchoring the scrollable layout to the window. | ||
| RowLayout { | ||
| parent: control.contentItem |
There was a problem hiding this comment.
指定它的parent,是为啥呀,能指定边距?
73d72a6 to
01c7829
Compare
| property bool enableBehindWindowBlur: true | ||
| color: enableBehindWindowBlur ? "transparent" : palette.base | ||
| height: layout.implicitHeight | ||
| width: minimumWidth |
There was a problem hiding this comment.
宽度设置为minimumWidth有啥说法么?
|
|
||
| Item { | ||
| id: content | ||
| anchors.fill: parent |
There was a problem hiding this comment.
这样写真的没有循环的问题么?
测下其它的场景吧,
01c7829 to
844eda4
Compare
|
TAG Bot New tag: 6.7.51 |
1. Add enableBehindWindowBlur property to DialogWindow with default true 2. Bind StyledBehindWindowBlur visibility to this new property 3. Disable behind window blur in SettingsDialog for better performance 4. Set SettingsDialog background to palette.base instead of transparent 5. Add rounded corner styling to SettingsDialog content background 6. Enable clipping on navigation and content ListViews to prevent overflow 7. Restructure content padding using individual padding properties Log: Added blur control option for dialog windows and improved settings dialog appearance Influence: 1. Test dialog windows with blur enabled/disabled to verify visual effects 2. Verify SettingsDialog displays correctly without blur effect 3. Check rounded corner appearance on settings content background 4. Test navigation list scrolling with clip enabled 5. Verify content list scrolling behavior with clip property 6. Test dialog window on different platforms for blur compatibility 7. Verify padding changes don't break layout on various screen sizes feat: 为 DialogWindow 添加窗口模糊控制 1. 为 DialogWindow 添加 enableBehindWindowBlur 属性,默认值为 true 2. 将 StyledBehindWindowBlur 的可见性绑定到新属性 3. 在 SettingsDialog 中禁用窗口后模糊以提升性能 4. 将 SettingsDialog 背景设置为 palette.base 而非透明 5. 为 SettingsDialog 内容背景添加圆角样式 6. 启用导航和内容 ListView 的裁剪以防止溢出 7. 使用独立的内边距属性重构内容布局 Log: 新增对话框窗口模糊控制选项并改进设置对话框外观 Influence: 1. 测试启用/禁用模糊效果的对话框窗口,验证视觉效果 2. 验证 SettingsDialog 在无模糊效果下的显示是否正确 3. 检查设置内容背景的圆角外观 4. 测试启用裁剪后的导航列表滚动 5. 验证内容列表在裁剪属性下的滚动行为 6. 在不同平台上测试对话框窗口的模糊兼容性 7. 验证内边距更改不会在各种屏幕尺寸下破坏布局 PMS: BUG-378325
844eda4 to
14c3baa
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 评分: 25/25 分析内容:
潜在问题: 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 评分: 24/25 分析内容:
潜在问题:
建议: 在 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 评分: 20/20 分析内容:
潜在问题: 4. 代码安全 🔒评价: 存在0个安全漏洞,安全合规 ✅ 通过 评分: 30/30 分析内容:
安全漏洞详情: 建议: 无需安全加固 💡 改进建议代码示例// DialogWindow.qml - 建议在属性声明上方添加注释
// Controls whether behind-window blur effect is enabled.
// When disabled, the window uses palette.base as background color instead of transparent.
property bool enableBehindWindowBlur: true📋 审查检查清单
本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, 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 |
Log: Added blur control option for dialog windows and improved settings dialog appearance
Influence:
feat: 为 DialogWindow 添加窗口模糊控制
Log: 新增对话框窗口模糊控制选项并改进设置对话框外观
Influence:
PMS: BUG-378325
Summary by Sourcery
Improve dialog window flexibility and refine the SettingsDialog appearance and layout.
New Features:
Bug Fixes:
Enhancements: