fix(StatusTagSelector): Fix mouse hover (#678)

Closes: status-im/status-desktop#5220
This commit is contained in:
Boris Melnik 2022-05-19 11:42:18 +03:00 committed by GitHub
parent 6ba2d8f3e6
commit b918897241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -355,8 +355,8 @@ Item {
anchors.rightMargin: 8 anchors.rightMargin: 8
anchors.leftMargin: 8 anchors.leftMargin: 8
radius: 8 radius: 8
visible: (root.sortedList.count > 0) visible: wrapper.ListView.isCurrentItem
color: (userListView.currentIndex === index) ? Theme.palette.baseColor2 : "transparent" color: Theme.palette.baseColor2
} }
StatusSmartIdenticon { StatusSmartIdenticon {
@ -393,12 +393,14 @@ Item {
} }
MouseArea { MouseArea {
id: sensor
cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor cursorShape: enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
acceptedButtons: Qt.LeftButton | Qt.RightButton acceptedButtons: Qt.LeftButton | Qt.RightButton
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onEntered: { onContainsMouseChanged: {
userListView.currentIndex = index; if (containsMouse)
userListView.currentIndex = index;
} }
onClicked: { onClicked: {
root.insertTag(model.name, model.publicId); root.insertTag(model.name, model.publicId);