@@ -18,7 +18,7 @@ import QtQuick 2.4
1818import QtQuick.Layouts 1.1
1919import Ubuntu.Components 1.3
2020
21−MouseArea {
21+AbstractButton {
2222 id: root
2323
2424 signal requestFavorite(string scopeId, bool favorite)
@@ -84,15 +84,19 @@ MouseArea {
8484 visible: text != ""
8585 }
8686 }
87− MouseArea {
87+ AbstractButton {
8888 id: starArea
8989 objectName: "starArea"
9090 height: parent.height
9191 width: height
9292 anchors.right: parent.right
9393 onClicked: if (!editMode) root.requestFavorite(model.scopeId, !isFavorite);
94− onPressed: if (editMode) root.handlePressed(starArea);
95− onReleased: if (editMode) root.handleReleased(starArea);
94+ onPressedChanged: {
95+ if (editMode) {
96+ if (pressed) root.handlePressed(starArea.__mouseArea);
97+ else root.handleReleased(starArea.__mouseArea);
98+ }
99+ }
96100 visible: editMode || showStar
97101 Icon {
98102 id: star