feat: cleanup
This commit is contained in:
1 parent
4d56835ade
commit
acc593a1e4
2 files changed
+16
-75
No files matched your search
@@ -95,19 +95,28 @@ PanelWindow {
|
||||
searchTimer.restart();
|
||||
}
|
||||
|
||||
Keys.onEscapePressed: {
|
||||
Keys.onEscapePressed: (event) => {
|
||||
rootState.commandPaletteOpen = false;
|
||||
event.accepted = true;
|
||||
}
|
||||
|
||||
Keys.onUpPressed: {
|
||||
if (appList.currentIndex > 0) appList.currentIndex--;
|
||||
Keys.onUpPressed: (event) => {
|
||||
if (appList.currentIndex > 0) {
|
||||
appList.currentIndex--;
|
||||
appList.positionViewAtIndex(appList.currentIndex, ListView.Contain);
|
||||
}
|
||||
event.accepted = true;
|
||||
}
|
||||
|
||||
Keys.onDownPressed: {
|
||||
if (appList.currentIndex < appList.count - 1) appList.currentIndex++;
|
||||
Keys.onDownPressed: (event) => {
|
||||
if (appList.currentIndex < appList.count - 1) {
|
||||
appList.currentIndex++;
|
||||
appList.positionViewAtIndex(appList.currentIndex, ListView.Contain);
|
||||
}
|
||||
event.accepted = true;
|
||||
}
|
||||
|
||||
Keys.onReturnPressed: {
|
||||
Keys.onReturnPressed: (event) => {
|
||||
if (appList.currentIndex >= 0 && appList.currentIndex < appModel.count) {
|
||||
let item = appModel.get(appList.currentIndex);
|
||||
let desktopName = item.desktopName;
|
||||
@@ -124,6 +133,7 @@ PanelWindow {
|
||||
launchProcess.restart();
|
||||
rootState.commandPaletteOpen = false;
|
||||
}
|
||||
event.accepted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user