diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-14 14:32:39 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-06-14 14:32:39 +0900 |
commit | 984b02fc0ea25d86cca5c1c837b8ac7648add20e (patch) | |
tree | fc6575806c44420fc7503cc8e3214ac170a8e085 /launcher/qml | |
parent | 8d4b3274086f658d7cd2bfa344491bfeb66b1a1e (diff) |
add app list
Diffstat (limited to '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() } } } |