mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 22:09:02 +02:00
Add spinner in place of "Logging in..."
This commit is contained in:
parent
8682cfc14a
commit
84ab8277df
1 changed files with 63 additions and 6 deletions
|
@ -252,15 +252,72 @@ Dialog {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Item {
|
||||||
id: messageText
|
|
||||||
width: loginDialog.inputWidth
|
width: loginDialog.inputWidth
|
||||||
height: loginDialog.inputHeight / 2
|
height: loginDialog.inputHeight / 2
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
|
|
||||||
text: loginDialog.statusText
|
Text {
|
||||||
color: "white"
|
id: messageText
|
||||||
|
|
||||||
|
visible: loginDialog.statusText != "" && loginDialog.statusText != "Logging in..."
|
||||||
|
|
||||||
|
width: loginDialog.inputWidth
|
||||||
|
height: loginDialog.inputHeight / 2
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
|
text: loginDialog.statusText
|
||||||
|
color: "white"
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: messageSpinner
|
||||||
|
|
||||||
|
visible: loginDialog.statusText == "Logging in..."
|
||||||
|
onVisibleChanged: visible ? messageSpinnerAnimation.restart() : messageSpinnerAnimation.stop()
|
||||||
|
|
||||||
|
spacing: 24
|
||||||
|
anchors {
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
horizontalCenter: parent.horizontalCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: spinner1
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
color: "#ebebeb"
|
||||||
|
opacity: 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: spinner2
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
color: "#ebebeb"
|
||||||
|
opacity: 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: spinner3
|
||||||
|
width: 10
|
||||||
|
height: 10
|
||||||
|
color: "#ebebeb"
|
||||||
|
opacity: 0.05
|
||||||
|
}
|
||||||
|
|
||||||
|
SequentialAnimation {
|
||||||
|
id: messageSpinnerAnimation
|
||||||
|
running: messageSpinner.visible
|
||||||
|
loops: Animation.Infinite
|
||||||
|
NumberAnimation { target: spinner1; property: "opacity"; to: 1.0; duration: 1000 }
|
||||||
|
NumberAnimation { target: spinner2; property: "opacity"; to: 1.0; duration: 1000 }
|
||||||
|
NumberAnimation { target: spinner3; property: "opacity"; to: 1.0; duration: 1000 }
|
||||||
|
NumberAnimation { target: spinner1; property: "opacity"; to: 0.05; duration: 0 }
|
||||||
|
NumberAnimation { target: spinner2; property: "opacity"; to: 0.05; duration: 0 }
|
||||||
|
NumberAnimation { target: spinner3; property: "opacity"; to: 0.05; duration: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
Loading…
Reference in a new issue