diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index afa0a28f6..357be6005 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -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