Fix hover property wrongly placed in button, not MouseArea

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
Dominique Fuchs 2020-01-17 16:30:27 +01:00
parent 599dae0486
commit c9719f44dc

View file

@ -20,22 +20,25 @@ MenuItem {
display: AbstractButton.IconOnly
flat: true
onHoveredChanged: {
accountStateIndicatorBackground.color = (containsMouse ? "#f6f6f6" : "white")
MouseArea {
anchors.fill: parent
hoverEnabled: true
onContainsMouseChanged: {
accountStateIndicatorBackground.color = (containsMouse ? "#f6f6f6" : "white")
}
onClicked: {
if (!isCurrentUser) {
userModelBackend.switchCurrentUser(id)
} else {
accountMenu.close()
}
}
}
background: Rectangle {
color: "transparent"
}
onClicked: {
if (!isCurrentUser) {
userModelBackend.switchCurrentUser(id)
} else {
accountMenu.close()
}
}
RowLayout {
id: accountControlRowLayout
height: accountButton.height