forked from 0x20/tab-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoadingView.qml
49 lines (41 loc) · 1.11 KB
/
LoadingView.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import QtQuick 2.4
import "Colors.js" as Colors
import "controls"
Rectangle {
color: "black"
signal retry()
property double progress: 0.5
property string message: "Loading"
Rectangle {
id: progressBar
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.verticalCenter
height: 20
color: Colors.primary[1]
}
Rectangle {
anchors.left: progressBar.left
anchors.top: progressBar.top
anchors.bottom: progressBar.bottom
width: progressBar.width * progress
color: Colors.primary[4]
}
Text {
anchors.bottom: progressBar.top
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: 50
font.family: "TheQuux"
text: message
color: "white"
}
TqButton {
anchors.horizontalCenter: progressBar.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 10
text: "retry"
onClicked: retry()
// We don't have this hooked up to anything...
visible: false
}
}