on xenial help sign in
Make clicking on launcher buttons have haptic feedback
1a073a0Albert Astals Cid
qml/Launcher/LauncherPanel.qml+5−1
@@ -73,7 +73,7 @@ Rectangle {
73 source: "graphics/home.png"
73 source: "graphics/home.png"
74 rotation: root.rotation
74 rotation: root.rotation
75 }
75 }
76− MouseArea {
76+ AbstractButton {
77 id: dashItem
77 id: dashItem
78 anchors.fill: parent
78 anchors.fill: parent
79 onClicked: root.showDashHome()
79 onClicked: root.showDashHome()
@@ -381,6 +381,7 @@ Rectangle {
381 }
381 }
382
382
383 onClicked: {
383 onClicked: {
384+ Haptics.play();
384 var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
385 var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
385 var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
386 var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
386
387
@@ -460,6 +461,8 @@ Rectangle {
460 return;
461 return;
461 }
462 }
462
463
464+ Haptics.play();
465+
463 draggedIndex = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
466 draggedIndex = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
464
467
465 // Opening QuickList
468 // Opening QuickList
@@ -673,6 +676,7 @@ Rectangle {
673 if (!model.clickable) {
676 if (!model.clickable) {
674 return;
677 return;
675 }
678 }
679+ Haptics.play();
676 quickList.state = "";
680 quickList.state = "";
677 // Unsetting model to prevent showing changing entries during fading out
681 // Unsetting model to prevent showing changing entries during fading out
678 // that may happen because of triggering an action.
682 // that may happen because of triggering an action.