feat: cleanup

This commit is contained in:
johannes committed 2026-09-21 16:15:00 +02:00
1 parent 8aa254bb87
commit fda7ea8524
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;
}
}
}