display: AbstractButton.IconOnly\r
flat: true\r
\r
+ onHoveredChanged: {\r
+ accountStateIndicatorBackground.color = (containsMouse ? "#f6f6f6" : "white")\r
+ }\r
+\r
background: Rectangle {\r
color: "transparent"\r
}\r
source: ("image://avatars/" + id)\r
Layout.preferredHeight: (userLineLayout.height -16)\r
Layout.preferredWidth: (userLineLayout.height -16)\r
+ Rectangle {\r
+ id: accountStateIndicatorBackground\r
+ width: accountStateIndicator.sourceSize.width + 2\r
+ height: width\r
+ anchors.bottom: accountAvatar.bottom\r
+ anchors.right: accountAvatar.right\r
+ color: "white"\r
+ radius: width*0.5\r
+ }\r
Image {\r
id: accountStateIndicator\r
source: isConnected ? "qrc:///client/theme/colored/state-ok.svg" : "qrc:///client/theme/colored/state-offline.svg"\r
cache: false\r
- anchors.bottom: accountAvatar.bottom\r
- anchors.right: accountAvatar.right\r
+ x: accountStateIndicatorBackground.x + 1\r
+ y: accountStateIndicatorBackground.y + 1\r
sourceSize.width: 16\r
sourceSize.height: 16\r
}\r
id: accountBtnMouseArea\r
anchors.fill: parent\r
hoverEnabled: true\r
+ onContainsMouseChanged: {\r
+ currentAccountStateIndicatorBackground.color = (containsMouse ? "#009dd9" : "#0082c9")\r
+ }\r
onClicked:\r
{\r
syncPauseButton.text = systrayBackend.syncIsPaused() ? qsTr("Resume sync for all") : qsTr("Pause sync for all")\r
source: "image://avatars/currentUser"\r
Layout.preferredHeight: (trayWindowHeaderBackground.height -16)\r
Layout.preferredWidth: (trayWindowHeaderBackground.height -16)\r
+ Rectangle {\r
+ id: currentAccountStateIndicatorBackground\r
+ width: currentAccountStateIndicator.sourceSize.width + 2\r
+ height: width\r
+ anchors.bottom: currentAccountAvatar.bottom\r
+ anchors.right: currentAccountAvatar.right\r
+ color: "#0082c9"\r
+ radius: width*0.5\r
+ }\r
Image {\r
id: currentAccountStateIndicator\r
source: userModelBackend.isUserConnected(userModelBackend.currentUserId()) ? "qrc:///client/theme/colored/state-ok.svg" : "qrc:///client/theme/colored/state-offline.svg"\r
cache: false\r
- anchors.bottom: currentAccountAvatar.bottom\r
- anchors.right: currentAccountAvatar.right\r
+ x: currentAccountStateIndicatorBackground.x + 1\r
+ y: currentAccountStateIndicatorBackground.y + 1\r
sourceSize.width: 16\r
sourceSize.height: 16\r
}\r