fix: add close button hint to timezone popup#2911
Conversation
The SearchableListViewPopup for timezone selection was missing a close button. The window flags were set to Qt.Dialog, which on some window managers does not automatically provide a close button. Added Qt.WindowCloseButtonHint to the flags to explicitly request a window close button. This ensures the popup has a standard close button for better user experience and consistency with other dialogs. Log: Added close button to timezone selection popup window Influence: 1. Open the datetime settings and click on the timezone selector 2. Verify the popup window has a close button in the title bar 3. Test that the close button functions correctly to dismiss the popup 4. Ensure the popup still appears centered and maintains its blur effect 5. Verify the popup behavior is consistent across different window managers fix: 为时区选择弹窗添加关闭按钮提示 时区选择使用的 SearchableListViewPopup 弹窗缺少关闭按钮。窗口标志之前仅 设置为 Qt.Dialog,在某些窗口管理器下不会自动提供关闭按钮。现在在 flags 中添加了 Qt.WindowCloseButtonHint,以明确请求窗口关闭按钮。这确保了弹窗 具有标准的关闭按钮,提升了用户体验并与其他对话框保持一致。 Log: 为时区选择弹窗窗口添加了关闭按钮 Influence: 1. 打开日期时间设置,点击时区选择器 2. 验证弹窗窗口的标题栏是否有关闭按钮 3. 测试关闭按钮功能是否正常,可以关闭弹窗 4. 确保弹窗仍然居中显示并保持模糊效果 5. 验证弹窗在不同窗口管理器下的行为是否一致 PMS: BUG-345583
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds an explicit window close button to the timezone selection SearchableListViewPopup by adjusting its window flags, ensuring a standard close button appears across window managers while preserving existing appearance and behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来分析一下这个git diff的修改:
语法逻辑:
代码质量:
代码性能:
代码安全:
改进建议: // For X11 system, _NET_WM_WINDOW_TYPE will add Dialog when added Qt.WindowCloseButtonHint
flags: Qt.Dialog | Qt.WindowCloseButtonHint或者更详细的注释: // Note: On X11 systems, the _NET_WM_WINDOW_TYPE property will automatically be set to Dialog
// when Qt.WindowCloseButtonHint is added. This ensures proper window type classification.
flags: Qt.Dialog | Qt.WindowCloseButtonHint其他建议:
总体来说,这个修改是合理的,主要是为了确保窗口在X11系统下有正确的窗口类型和行为。 |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The new comment about
_NET_WM_WINDOW_TYPEis a bit unclear; consider rephrasing or expanding it (or linking to the relevant Qt/WM behavior) so future readers understand whyQt.WindowCloseButtonHintis needed alongsideQt.Dialog.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new comment about `_NET_WM_WINDOW_TYPE` is a bit unclear; consider rephrasing or expanding it (or linking to the relevant Qt/WM behavior) so future readers understand why `Qt.WindowCloseButtonHint` is needed alongside `Qt.Dialog`.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia 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: blocked) |
The SearchableListViewPopup for timezone selection was missing a
close button. The window flags were set to Qt.Dialog, which on some
window managers does not automatically provide a close button. Added
Qt.WindowCloseButtonHint to the flags to explicitly request a window
close button. This ensures the popup has a standard close button for
better user experience and consistency with other dialogs.
Log: Added close button to timezone selection popup window
Influence:
managers
fix: 为时区选择弹窗添加关闭按钮提示
时区选择使用的 SearchableListViewPopup 弹窗缺少关闭按钮。窗口标志之前仅
设置为 Qt.Dialog,在某些窗口管理器下不会自动提供关闭按钮。现在在 flags
中添加了 Qt.WindowCloseButtonHint,以明确请求窗口关闭按钮。这确保了弹窗
具有标准的关闭按钮,提升了用户体验并与其他对话框保持一致。
Log: 为时区选择弹窗窗口添加了关闭按钮
Influence:
PMS: BUG-345583
Summary by Sourcery
Bug Fixes: