From: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> Date: Fri, 17 Jan 2020 15:30:27 +0000 (+0100) Subject: Fix hover property wrongly placed in button, not MouseArea X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~413^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c9719f44dc913dd362a93d11b80c2b2dcc672dc2;p=nextcloud-desktop.git Fix hover property wrongly placed in button, not MouseArea Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com> --- 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