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: {
|
||||
// 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 {
|
||||
|
Reference in New Issue
Block a user