forked from qt-creator/qt-creator
QmlDesigner: Refresh user info in share dialog
* Fetch user info when opening the share dialog to keep the shown data up to date * Add a small button to trigger an immediate refresh of the user info Task-number: QDS-14408 Change-Id: Idff4d8684963333a2e1997465325c10f5e69a6b1 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Burak Hancerli <burak.hancerli@qt.io>
This commit is contained in:
committed by
Henning Gründl
parent
14a5675e23
commit
40c2c1bbdb
@@ -346,8 +346,8 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
// if visible and logged in
|
if (dvWindow.visible)
|
||||||
// fetch user info
|
backend.designViewerConnector.fetchUserInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
onClosing: {
|
onClosing: {
|
||||||
@@ -547,11 +547,46 @@ Rectangle {
|
|||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
width: parent.width
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
Layout.fillWidth: true
|
||||||
color: StudioTheme.Values.themeTextColor
|
color: StudioTheme.Values.themeTextColor
|
||||||
text: loggedInPage.email ?? ""
|
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 {
|
RowLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user