diff options
Diffstat (limited to 'launcher/qml/Launcher.qml')
-rw-r--r-- | launcher/qml/Launcher.qml | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml index 034e05a..4b1971a 100644 --- a/launcher/qml/Launcher.qml +++ b/launcher/qml/Launcher.qml @@ -138,24 +138,13 @@ ApplicationWindow { } onReleased: { if (currentId === '' && loc.index >= 0 ) { - // Not long press, exec application and tapshortcut -// pid = launcher.launch(applicationModel.id(loc.index)) -// if (1 < pid) { homescreenHandler.tapShortcut(applicationModel.appid(loc.index)) - -// } -// else { -// console.warn("app cannot be launched!") -// } } else if (loc.mouseY <= 0) { if (loc.mouseX >= 197 && loc.mouseX < 393) { -// shortcutAppModel.changeShortcut(currentId, currentName, "0"); homescreenHandler.registerShortcut(currentId, currentName, "0"); } else if (loc.mouseX >= 393 && loc.mouseX < 589) { -// shortcutAppModel.changeShortcut(currentId, currentName, "1"); homescreenHandler.registerShortcut(currentId, currentName, "1"); } else if (loc.mouseX >= 589 && loc.mouseX < 785) { -// shortcutAppModel.changeShortcut(currentId, currentName, "2"); homescreenHandler.registerShortcut(currentId, currentName, "2"); } if (oldIndex != newIndex){ @@ -175,6 +164,10 @@ ApplicationWindow { uninstallDialog.uninstallApp = currentId uninstallDialog.visible = true } + if (oldIndex != newIndex){ +// applicationModel.recordAppsPosition(newIndex, oldIndex, 0) + applicationModel.move(newIndex, newIndex = oldIndex) + } } currentName = '' @@ -185,7 +178,8 @@ ApplicationWindow { if (loc.currentId === '') return if (index < 0) return if (index === newIndex) return - applicationModel.move(newIndex, newIndex = index) + applicationModel.move(newIndex, newIndex = index) + applicationModel.recordAppsPosition() } } } |