From: Kevin Ottens Date: Wed, 21 Oct 2020 09:24:06 +0000 (+0200) Subject: Get rid of ncBlueHover X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~98^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0e9efe728a846102d0044e019135a4f0d05ac729;p=nextcloud-desktop.git Get rid of ncBlueHover Use a similar trick of a semi-transparent rectangle on top when the mouse area is hovered. This way it will always work whatever is the background color. Signed-off-by: Kevin Ottens --- diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index 6c33c1c4f..e19bd37ba 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -143,12 +143,6 @@ Window { anchors.fill: parent hoverEnabled: Style.hoverEffectsEnabled - // HACK: Imitate Qt hover effect brightness (which is not accessible as property) - // so that indicator background also flicks when hovered - onContainsMouseChanged: { - currentAccountStateIndicatorBackground.color = (containsMouse ? Style.ncBlueHover : Style.ncBlue) - } - // We call open() instead of popup() because we want to position it // exactly below the dropdown button, not the mouse onClicked: { @@ -349,6 +343,16 @@ Window { radius: width*0.5 } + Rectangle { + width: Style.accountAvatarStateIndicatorSize + 2 + height: width + anchors.bottom: currentAccountAvatar.bottom + anchors.right: currentAccountAvatar.right + color: accountBtnMouseArea.containsMouse ? "white" : "transparent" + opacity: 0.2 + radius: width*0.5 + } + Image { id: currentAccountStateIndicator source: UserModel.isUserConnected(UserModel.currentUserId) ? "qrc:///client/theme/colored/state-ok.svg" : "qrc:///client/theme/colored/state-offline.svg" diff --git a/theme/Style/Style.qml b/theme/Style/Style.qml index 8909c6377..b13a2b57e 100644 --- a/theme/Style/Style.qml +++ b/theme/Style/Style.qml @@ -6,7 +6,6 @@ import QtQuick 2.5 QtObject { // Colors property color ncBlue: "#0082c9" - property color ncBlueHover: "#009dd9" property color lightHover: "#f7f7f7" property color menuBorder: "#bdbdbd"