Conversation
…ton chain Consolidate all 7 power/permission buttons (lock, switch user, logout, shut down, reboot, suspend, hibernate) into ShutdownView.qml as a flat RowLayout. Remove PowerList.qml and its ObjectModel injection, loopInside/tabOutForward/tabOutBackward signals. Tab navigation is now a simple linear chain within ShutdownView. ControlAction uses ShutdownView directly with outsideClicked signal. 将全部 7 个电源/权限按钮(lock/switch user/logout/shut down/reboot/ suspend/hibernate)收拢进 ShutdownView.qml 的扁平 RowLayout 按钮链。 删除 PowerList.qml 及 ObjectModel 注入、loopInside/tabOut* 信号,tab 导航改为 ShutdownView 内线性链。ControlAction 直接使用 ShutdownView 和 outsideClicked 信号。 Log: 重构锁屏电源按钮为扁平链,删除 PowerList Influence: 锁屏电源/权限按钮交互简化,键盘导航改为线性链,代码可维护性提升。
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm 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 lock-screen power and permission actions are consolidated into a single statically wired ShutdownView, replacing PowerList’s dynamic focus/tab behavior with explicit keyboard navigation, shared overlay close handling, and unified translation/build integration. Sequence diagram for opening and closing the lock-screen shutdown viewsequenceDiagram
participant User
participant ControlAction
participant ShutdownView
participant LoginView
participant GreeterProxy
User->>ControlAction: onClicked
ControlAction->>ControlAction: powerItem.expand = true
ControlAction->>ShutdownView: focusFirstButton()
User->>ShutdownView: outside click
ShutdownView-->>ControlAction: outsideClicked()
ControlAction->>ControlAction: powerItem.expand = false
ShutdownView-->>LoginView: outsideClicked()
LoginView->>GreeterProxy: showShutdownView = false
Flow diagram for the flat shutdown button focus chainflowchart LR
Lock[lockBtn] --> Switch[switchBtn]
Switch --> Logout[logoutBtn]
Logout --> PowerOff[powerOffBtn]
PowerOff --> Reboot[rebootBtn]
Reboot --> Suspend[suspendBtn]
Suspend --> Hibernate[hibernateBtn]
Lock -. backtab .-> Hibernate
Switch -. backtab .-> Lock
Logout -. backtab .-> Switch
PowerOff -. backtab .-> Logout
Reboot -. backtab .-> PowerOff
Suspend -. backtab .-> Reboot
Hibernate -. backtab .-> Suspend
Locked[GreeterProxy.isLocked] -.-> PowerOff
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
重构锁屏电源/权限按钮:合并 PowerList 至 ShutdownView,用扁平按钮链替代循环式 tab 跳转
WM-464
变更内容
将锁屏
src/plugins/lockscreen/qml/下的两套电源/权限按钮实现合并为单一的扁平按钮链:outsideClicked()信号和focusFirstButton()函数。visible: enabled,使 visible 与 enabled 独立判定。powerVisible改为跟踪powerShutdownView.visible,点击外部通过onOutsideClicked关闭。onOutsideClicked: GreeterProxy.showShutdownView = false。qml/PowerList.qml。变更统计
24 files changed, 446 insertions(+), 585 deletions(-)
代码审核
代码已通过 AI 审核(97 分),审核建议的两处优化已应用:
enabled: truepowerOffBtn的KeyNavigation.backtab条件表达式上方添加注释Summary by Sourcery
Replace the lockscreen PowerList implementation with a unified ShutdownView action chain and update its integration and translations.
Enhancements:
Build:
Chores: