修复切换窗口大小后,不能通过按键切换到搜索结果的问题
This commit is contained in:
parent
ba4201703b
commit
4bc48754f3
|
@ -37,7 +37,7 @@ AppControls2.StyleBackground {
|
||||||
id: appPageHeader
|
id: appPageHeader
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 40
|
Layout.preferredHeight: 40
|
||||||
focusToListView: appPageContent
|
focusToPageContent: appPageContent
|
||||||
}
|
}
|
||||||
|
|
||||||
AppPageContent {
|
AppPageContent {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import org.ukui.menu.utils 1.0
|
||||||
Item {
|
Item {
|
||||||
id: appPageHeaderRoot
|
id: appPageHeaderRoot
|
||||||
property string title: ""
|
property string title: ""
|
||||||
property Item focusToListView
|
property Item focusToPageContent
|
||||||
property Component content: null
|
property Component content: null
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
radius: 16
|
radius: 16
|
||||||
changeFocusTarget: focusToListView
|
changeFocusTarget: focusToPageContent
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
if (text === "") {
|
if (text === "") {
|
||||||
pluginSelectMenu.model.reactivateProvider();
|
pluginSelectMenu.model.reactivateProvider();
|
||||||
|
|
|
@ -14,7 +14,7 @@ FocusScope {
|
||||||
if ((0x2f < event.key && event.key < 0x3a)||(0x40 < event.key && event.key < 0x5b)) {
|
if ((0x2f < event.key && event.key < 0x3a)||(0x40 < event.key && event.key < 0x5b)) {
|
||||||
focus = true;
|
focus = true;
|
||||||
appPage.header.changeToSearch(event.text);
|
appPage.header.changeToSearch(event.text);
|
||||||
// 任意方向键切换至搜索结果
|
// 任意方向键切换至应用列表
|
||||||
} else if ((0x01000011 < event.key)&&(event.key < 0x01000016)) {
|
} else if ((0x01000011 < event.key)&&(event.key < 0x01000016)) {
|
||||||
focus = true;
|
focus = true;
|
||||||
appPage.content.focus = true;
|
appPage.content.focus = true;
|
||||||
|
|
|
@ -101,7 +101,9 @@ AppControls2.StyleBackground {
|
||||||
activeFocusOnTab: true
|
activeFocusOnTab: true
|
||||||
function changeFocusToListView() {
|
function changeFocusToListView() {
|
||||||
if (!mainWindow.isFullScreen) {
|
if (!mainWindow.isFullScreen) {
|
||||||
changeFocusTarget.focus = true
|
normalUI.focus = true;
|
||||||
|
changeFocusTarget.focus = true;
|
||||||
|
appPage.content.resetFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onEditingFinished: changeFocusToListView()
|
onEditingFinished: changeFocusToListView()
|
||||||
|
|
Loading…
Reference in New Issue