fix(ui): simplify titlebar responsive logic and make about dialog modal#666
fix(ui): simplify titlebar responsive logic and make about dialog modal#666deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Remove responsive visibility controls based on window width, simplify search box and button visibility logic. Add WindowModal property to AboutDialog. 移除基于窗口宽度的响应式显示控制,简化搜索框和按钮的可见性逻辑。 为关于对话框添加模态属性。 Log: 简化标题栏响应式逻辑,关于对话框改为模态显示 Influence: 标题栏UI逻辑更简洁,不再根据窗口宽度动态隐藏控件,关于对话框显示时阻塞父窗口交互。
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMakes the About dialog window-modal and simplifies titlebar responsive UI logic so controls are no longer conditionally hidden based on window width. Sequence diagram for opening the window-modal About dialogsequenceDiagram
actor User
participant WindowTitlebar
participant HelpAction
participant AboutAction
participant AboutDialog
User->>WindowTitlebar: click About in titlebar menu
WindowTitlebar->>HelpAction: trigger help menu
HelpAction->>AboutAction: trigger About action
AboutAction->>AboutDialog: create with modality Qt.WindowModal
AboutAction->>AboutDialog: open dialog
AboutDialog-->>WindowTitlebar: block interaction while open
User->>AboutDialog: close dialog
AboutDialog-->>WindowTitlebar: release interaction after close
Class diagram for AboutDialog with WindowModal propertyclassDiagram
class AboutDialog {
+string productName
+string productIcon
+string description
+QtWindowModality modality
+open()
+close()
}
class AboutAction {
+AboutDialog aboutDialog
+trigger()
}
AboutAction --> AboutDialog : creates_and_opens
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review这段代码的修改主要是为 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
改进建议虽然当前的修改是正确的,但为了代码的健壮性和可维护性,可以考虑以下几点:
总结这是一个低风险、高价值的修改。它通过添加一行代码改善了用户交互体验,防止了用户在打开关于对话框时误操作主窗口。代码逻辑清晰,符合 QML 开发规范。建议采纳。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind 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 |
|
/merge |
Remove responsive visibility controls based on window width, simplify search box and button visibility logic. Add WindowModal property to AboutDialog.
移除基于窗口宽度的响应式显示控制,简化搜索框和按钮的可见性逻辑。
为关于对话框添加模态属性。
Log: 简化标题栏响应式逻辑,关于对话框改为模态显示
Influence: 标题栏UI逻辑更简洁,不再根据窗口宽度动态隐藏控件,关于对话框显示时阻塞父窗口交互。
Summary by Sourcery
Enhancements: