Fix highlighting

This commit is contained in:
David Rowe 2018-11-15 10:15:30 +13:00
parent 010f7121a3
commit 9c5d318341

View file

@ -244,13 +244,9 @@ Item {
z: 1 z: 1
} }
MouseArea { MouseArea {
anchors.fill: parent; anchors.fill: parent
acceptedButtons: Qt.LeftButton; acceptedButtons: Qt.LeftButton
onClicked: { hoverEnabled: true
Tablet.playSound(TabletEnums.ButtonClick);
goFunction("hifi://" + hifiUrl);
}
hoverEnabled: true;
onContainsMouseChanged: { onContainsMouseChanged: {
// Use onContainsMouseChanged rather than onEntered and onExited because the latter aren't always // Use onContainsMouseChanged rather than onEntered and onExited because the latter aren't always
// triggered correctly - e.g., if drag rightwards from right hand side of a card to the next card // triggered correctly - e.g., if drag rightwards from right hand side of a card to the next card
@ -263,6 +259,17 @@ Item {
} }
} }
} }
MouseArea {
// Separate MouseArea for click handling so that it doesn't interfere with hovering and interaction
// with containing ListView.
anchors.fill: parent
acceptedButtons: Qt.LeftButton
hoverEnabled: false
onClicked: {
Tablet.playSound(TabletEnums.ButtonClick);
goFunction("hifi://" + hifiUrl);
}
}
StateImage { StateImage {
id: actionIcon; id: actionIcon;
visible: !isAnnouncement; visible: !isAnnouncement;