on xenial help sign in
Make clicking on launcher buttons have haptic feedback

since dndArea uses onPositionChanged could not convert it to AbstractButton and had to call Haptics.play manually Approved by: Michael Zanetti

commit1a073a05d588fad4bd410d131166736afd924a49 authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 31 Aug 2015, 10:25 (11 years ago) parenta5689f895505e6
1 file changed+5−1
qml/Launcher/LauncherPanel.qml+5−1
qml/Launcher/LauncherPanel.qml+5−1
@@ -73,7 +73,7 @@ Rectangle {
7373 source: "graphics/home.png"
7474 rotation: root.rotation
7575 }
76− MouseArea {
76+ AbstractButton {
7777 id: dashItem
7878 anchors.fill: parent
7979 onClicked: root.showDashHome()
@@ -381,6 +381,7 @@ Rectangle {
381381 }
382382
383383 onClicked: {
384+ Haptics.play();
384385 var index = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
385386 var clickedItem = launcherListView.itemAt(mouseX, mouseY + launcherListView.realContentY)
386387
@@ -460,6 +461,8 @@ Rectangle {
460461 return;
461462 }
462463
464+ Haptics.play();
465+
463466 draggedIndex = Math.floor((mouseY + launcherListView.realContentY) / launcherListView.realItemHeight);
464467
465468 // Opening QuickList
@@ -673,6 +676,7 @@ Rectangle {
673676 if (!model.clickable) {
674677 return;
675678 }
679+ Haptics.play();
676680 quickList.state = "";
677681 // Unsetting model to prevent showing changing entries during fading out
678682 // that may happen because of triggering an action.