Skip to content

Commit 66f3128

Browse files
pengfeixxdeepin-bot[bot]
authored andcommitted
fix: Fix the focus issue on secondary pages in Quick Settings
Fix the focus issue on secondary pages in Quick Settings Log: Fix the focus issue on secondary pages in Quick Settings pms: BUG-341435
1 parent a662e47 commit 66f3128

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

panels/dock/tray/ShellSurfaceItemProxy.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Item {
2020
implicitWidth: shellSurface ? shellSurface.width : 10
2121
implicitHeight: shellSurface ? shellSurface.height : 10
2222

23+
function takeFocus() {
24+
impl.takeFocus()
25+
}
26+
2327
ShellSurfaceItem {
2428
id: impl
2529
width: parent.width

panels/dock/tray/quickpanel/QuickPanelPage.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Item {
6464
StackView.onActivating: function () {
6565
panelView.contentHeight = Qt.binding(function() { return contentHeight})
6666
}
67+
StackView.onActivated: function () {
68+
takeFocus()
69+
}
6770
}
6871
}
6972
}

panels/dock/tray/quickpanel/SubPluginPage.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Item {
2222
property int subPluginMinHeight
2323
property int headerMargin: 10
2424

25+
function takeFocus() {
26+
surfaceLayer.takeFocus()
27+
}
28+
2529
Component.onCompleted: {
2630
var surfaceMinHeight = subPluginMinHeight - titleLayer.height - headerMargin
2731
shellSurface.setEmbedPanelMinHeight(surfaceMinHeight)

0 commit comments

Comments
 (0)