mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-07-26 06:14:45 +00:00
prototype for pressandhold
This commit is contained in:
parent
6e09e7d877
commit
bb4d3e321e
1 changed files with 11 additions and 0 deletions
|
|
@ -11,6 +11,17 @@ MouseArea {
|
||||||
console.log("Clicked: " + model.ApplicationStorageIdRole)
|
console.log("Clicked: " + model.ApplicationStorageIdRole)
|
||||||
appListModel.runApplication(model.ApplicationStorageIdRole)
|
appListModel.runApplication(model.ApplicationStorageIdRole)
|
||||||
}
|
}
|
||||||
|
onPressAndHold: {
|
||||||
|
root.drag.target = root;
|
||||||
|
}
|
||||||
|
onReleased: {
|
||||||
|
root.drag.target = null;
|
||||||
|
}
|
||||||
|
onPositionChanged: {
|
||||||
|
if (root.drag.target) {
|
||||||
|
print("New position: " +(Math.round(GridView.view.width / GridView.view.cellWidth) * Math.round(root.y / GridView.view.cellHeight) + Math.round(root.x / GridView.view.cellWidth)))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue