Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions qml/windowed/IconItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,24 @@ Control {
drag.onActiveChanged: function () {
root.Drag.active = drag.active
}

TapHandler {
acceptedDevices: PointerDevice.TouchScreen
gesturePolicy: TapHandler.DragThreshold
onTapped: function(eventPoint, buttons) {
root.itemClicked()
}
onLongPressed: {
root.menuTriggered()
}
}

onPressed: function (mouse) {
// 触屏合成的鼠标事件不接受,交给 Flickable 处理滚动
if (mouse.source !== undefined && mouse.source !== Qt.MouseEventNotSynthesized) {
mouse.accepted = false
return
}
if (mouse.button === Qt.LeftButton && root.dndEnabled) {
appIcon.grabToImage(function(result) {
root.Drag.imageSource = result.url;
Expand Down
Loading