From 4bc48754f3d066b0f92b2cd885c744eae2f42534 Mon Sep 17 00:00:00 2001 From: qiqi Date: Wed, 24 May 2023 13:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=A4=A7=E5=B0=8F=E5=90=8E=EF=BC=8C=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E6=8C=89=E9=94=AE=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qml/AppUI/AppPage.qml | 2 +- qml/AppUI/AppPageHeader.qml | 4 ++-- qml/AppUI/NormalUI.qml | 2 +- qml/AppUI/SearchInputBar.qml | 4 +++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/qml/AppUI/AppPage.qml b/qml/AppUI/AppPage.qml index 1de6cf3..181d5bb 100644 --- a/qml/AppUI/AppPage.qml +++ b/qml/AppUI/AppPage.qml @@ -37,7 +37,7 @@ AppControls2.StyleBackground { id: appPageHeader Layout.fillWidth: true Layout.preferredHeight: 40 - focusToListView: appPageContent + focusToPageContent: appPageContent } AppPageContent { diff --git a/qml/AppUI/AppPageHeader.qml b/qml/AppUI/AppPageHeader.qml index ea179a8..7d5437f 100644 --- a/qml/AppUI/AppPageHeader.qml +++ b/qml/AppUI/AppPageHeader.qml @@ -26,7 +26,7 @@ import org.ukui.menu.utils 1.0 Item { id: appPageHeaderRoot property string title: "" - property Item focusToListView + property Item focusToPageContent property Component content: null clip: true @@ -133,7 +133,7 @@ Item { Layout.fillWidth: true Layout.fillHeight: true radius: 16 - changeFocusTarget: focusToListView + changeFocusTarget: focusToPageContent onTextChanged: { if (text === "") { pluginSelectMenu.model.reactivateProvider(); diff --git a/qml/AppUI/NormalUI.qml b/qml/AppUI/NormalUI.qml index a27eced..87c355e 100644 --- a/qml/AppUI/NormalUI.qml +++ b/qml/AppUI/NormalUI.qml @@ -14,7 +14,7 @@ FocusScope { if ((0x2f < event.key && event.key < 0x3a)||(0x40 < event.key && event.key < 0x5b)) { focus = true; appPage.header.changeToSearch(event.text); - // 任意方向键切换至搜索结果 + // 任意方向键切换至应用列表 } else if ((0x01000011 < event.key)&&(event.key < 0x01000016)) { focus = true; appPage.content.focus = true; diff --git a/qml/AppUI/SearchInputBar.qml b/qml/AppUI/SearchInputBar.qml index be9fa96..9415cef 100644 --- a/qml/AppUI/SearchInputBar.qml +++ b/qml/AppUI/SearchInputBar.qml @@ -101,7 +101,9 @@ AppControls2.StyleBackground { activeFocusOnTab: true function changeFocusToListView() { if (!mainWindow.isFullScreen) { - changeFocusTarget.focus = true + normalUI.focus = true; + changeFocusTarget.focus = true; + appPage.content.resetFocus(); } } onEditingFinished: changeFocusToListView()