diff --git a/share/qtcreator/qmldesigner/toolbar/Main.qml b/share/qtcreator/qmldesigner/toolbar/Main.qml index b5f3145e192..574f6fd1d53 100644 --- a/share/qtcreator/qmldesigner/toolbar/Main.qml +++ b/share/qtcreator/qmldesigner/toolbar/Main.qml @@ -346,8 +346,8 @@ Rectangle { } onVisibleChanged: { - // if visible and logged in - // fetch user info + if (dvWindow.visible) + backend.designViewerConnector.fetchUserInfo() } onClosing: { @@ -547,9 +547,44 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter spacing: 4 - Text { - color: StudioTheme.Values.themeTextColor - text: loggedInPage.email ?? "" + + RowLayout { + width: parent.width + + Text { + Layout.fillWidth: true + color: StudioTheme.Values.themeTextColor + text: loggedInPage.email ?? "" + } + + Label { + id: refresehIcon + width: 18 + height: 18 + color: StudioTheme.Values.themeTextColor + font.family: StudioTheme.Constants.iconFont.family + font.pixelSize: 14 + text: StudioTheme.Constants.updateContent_medium + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + scale: refresehMouseArea.containsMouse ? 1.2 : 1 + + RotationAnimation on rotation { + id: refresehAnimation + from: 0 + to: 360 + } + + MouseArea { + id: refresehMouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: { + refresehAnimation.start() + backend.designViewerConnector.fetchUserInfo() + } + } + } } RowLayout {