diff --git a/qml/windowed/AppList.qml b/qml/windowed/AppList.qml index af7231b5..d33c29a5 100644 --- a/qml/windowed/AppList.qml +++ b/qml/windowed/AppList.qml @@ -25,8 +25,8 @@ ColumnLayout { loader.item.focus = true } - function positionViewAtBeginning() { - loader.item.positionViewAtBeginning() + function resetViewState() { + loader.item.resetViewState() } function switchToFreeSort(freeSort) { diff --git a/qml/windowed/AppListView.qml b/qml/windowed/AppListView.qml index 2d509b07..762b3ad7 100644 --- a/qml/windowed/AppListView.qml +++ b/qml/windowed/AppListView.qml @@ -17,9 +17,14 @@ FocusScope { property Item keyTabTarget: listView property alias model: listView.model + property var categoryMenu: null - function positionViewAtBeginning() { + function resetViewState() { listView.positionViewAtBeginning() + if (!LauncherController.visible) { + alphabetCategoryPopup.close() + if (categoryMenu) categoryMenu.close() + } } function scrollToAlphabetCategory(character) { @@ -133,6 +138,7 @@ FocusScope { } else if (CategorizedSortProxyModel.categoryType === CategorizedSortProxyModel.DDECategory) { ddeCategoryMenu.existingSections = CategorizedSortProxyModel.DDECategorySections() listView.opacity = 0.1 + root.categoryMenu = ddeCategoryMenu ddeCategoryMenu.open() } } diff --git a/qml/windowed/WindowedFrame.qml b/qml/windowed/WindowedFrame.qml index d452dace..bfb78781 100644 --- a/qml/windowed/WindowedFrame.qml +++ b/qml/windowed/WindowedFrame.qml @@ -286,8 +286,8 @@ InputEventItem { bottomBar.searchEdit.text = "" // reset(remove) keyboard focus baseLayer.focus = true - // reset scroll area position - appList.positionViewAtBeginning() + // reset scroll area position and state + appList.resetViewState() folderGridViewPopup.close() } }