Repository navigation
Conversation
1. Change window flags from WindowStaysOnTopHint/Tool to Dialog with close button hint 2. Add --parent-window option to set transient parent via X11 window ID 3. Skip manual centering when a parent window is set, letting the WM position the dialog 4. Ensure the close button is always visible and connected to close the window 5. Exit the application after the window closes in closeEvent to avoid lingering processes with a foreign parent 6. Dim the background opacity of disabled buttons and skip highlight text color when disabled 7. Add spacing and titlebar margins for proper icon and close button layout 8. Add unit tests for consent gating, disabled button rendering, dialog flags, and close behavior Log: Fixed license dialog staying on top and added parent window support with proper close button behavior Influence: 1. Verify the dialog no longer stays above other applications on both X11 and Wayland 2. Test the --parent-window option with a valid X11 window ID and confirm the dialog is transient to the parent 3. Confirm the window manager centers the dialog relative to the parent when a parent is provided 4. Verify manual centering still works when no parent window is specified 5. Test the close button closes the window and exits the application in all launch modes (with/without titlebar icon, with/without hide-bottom) 6. Verify the close button is always visible and functional 7. Test that the accept button remains disabled until the consent checkbox is checked 8. Verify disabled buttons have a dimmed background and no highlight text color 9. Run the unit tests to confirm all new test cases pass fix: 优化许可对话框窗口行为 1. 将窗口标志从 WindowStaysOnTopHint/Tool 改为带关闭按钮提示的 Dialog 2. 添加 --parent-window 选项,通过 X11 窗口 ID 设置临时父窗口 3. 设置父窗口时跳过手动居中,由窗口管理器定位对话框 4. 确保关闭按钮始终可见并连接到关闭窗口操作 5. 在 closeEvent 中关闭窗口后退出应用,避免存在外部父窗口时进程残留 6. 降低禁用按钮的背景透明度,禁用时跳过高亮文字颜色 7. 添加间距和标题栏边距以正确布局图标和关闭按钮 8. 添加针对同意勾选控制、禁用按钮渲染、对话框标志和关闭行为的单元测试 Log: 修复许可对话框置顶问题,新增父窗口支持并完善关闭按钮行为 Influence: 1. 验证对话框在 X11 和 Wayland 下不再始终置顶于其他应用之上 2. 使用有效的 X11 窗口 ID 测试 --parent-window 选项,确认对话框为父窗口 的临时窗口 3. 确认提供父窗口时窗口管理器相对父窗口居中对话框 4. 验证未指定父窗口时手动居中仍然有效 5. 在所有启动模式下测试关闭按钮关闭窗口并退出应用(有无标题栏图标、有无 隐藏底部) 6. 验证关闭按钮始终可见且可用 7. 测试同意勾选框未勾选时接受按钮保持禁用 8. 验证禁用按钮背景变暗且无高亮文字颜色 9. 运行单元测试确认所有新增测试用例通过 PMS: BUG-380347
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Reviewer's GuideThe PR converts the license window into a standard closeable dialog with optional X11 transient-parent support, delegates parented positioning to the window manager, ensures reliable close-and-exit behavior, refines titlebar and disabled-button styling, and adds regression tests for the primary interaction and window-state changes. Sequence diagram for license dialog startup and closingsequenceDiagram
participant User
participant Application
participant MainWindow
participant WindowManager
User->>Application: start with --parent-window
Application->>Application: QWindow::fromWinId
Application->>MainWindow: setTransientParent
Application->>WindowManager: show transient dialog
WindowManager-->>MainWindow: position relative to parent
MainWindow-->>User: display closeable dialog
User->>MainWindow: click close button
MainWindow->>MainWindow: closeEvent
MainWindow->>Application: qApp->exit(0)
Flow diagram for license consent gatingflowchart TD
Start([Dialog displayed]) --> Consent{Consent checkbox checked?}
Consent -->|No| Disabled[Accept button disabled]
Consent -->|Yes| Enabled[Accept button enabled]
Disabled --> Consent
Enabled --> Accept[User accepts license]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本次变更代码质量良好,无需修复。以下为可选的改进建议示例(非必须): // content.cpp 中可考虑将透明度魔法数字提取为命名常量 static constexpr qreal kEnabledOpacity = 0.15; static constexpr qreal kDisabledOpacity = 0.06; static constexpr qreal kSunkenOpacity = 0.25; static constexpr qreal kHoverOpacity = 0.20;本报告由 AI 代码审查工具自动生成 |
Log: Fixed license dialog staying on top and added parent window support with proper close button behavior
Influence:
fix: 优化许可对话框窗口行为
Log: 修复许可对话框置顶问题,新增父窗口支持并完善关闭按钮行为
Influence:
PMS: BUG-380347
Summary by Sourcery
Improve license dialog window behavior across launch modes and display systems.
New Features:
Bug Fixes:
Enhancements:
Tests: