Newer
Older
import QtQuick
import QtQuick.Controls
import QtQuick.Effects
import QtQuick.Layouts
import QtQuick.Templates as T
import QtQuick.Controls.impl
import QtQuick.Controls.Material
import QtQuick.Controls.Material.impl
import "../themes/themes.js" as Theme
Item {
id: statusbox
anchors.fill: parent
id: statusBoxBackground
Image {
id: backgroundImage
anchors.fill: parent
source: customTheme.bgDisconnected
}
}
ToolButton {
id: settingsButton
objectName: "settingsButton"
topMargin: Theme.windowMargin + 5
leftMargin: Theme.windowMargin + 5
HoverHandler {
cursorShape: Qt.PointingHandCursor
}
width: 16
height: 16
anchors.centerIn: settingsButton
source: "../resources/gear-fill.svg"
Rectangle {
id: statusLabelWrapper
height: 45
anchors {
top: statusBoxBackground.top
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
FadeBehavior on text {
}
Label {
id: snowflakeTip
anchors.top: connectionState.bottom
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 20
horizontalAlignment: Text.AlignHCenter
text: qsTr("This can take several minutes")
font.pixelSize: Theme.fontSize * 0.8
visible: isSnowflakeOn()
}
ProgressBar {
id: snowflakeProgressBar
anchors.top: snowflakeTip.bottom
anchors.horizontalCenter: parent.horizontalCenter
visible: isSnowflakeOn()
value: 0
}
Label {
id: snowflakeTag
anchors.top: snowflakeProgressBar.bottom
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
visible: isSnowflakeOn()
}
}
Column {
id: col
width: parent.width * 0.8
anchors.horizontalCenter: parent.horizontalCenter
// TODO this can be synced with opacity serial animation, see
// https://doc.qt.io/qt-5/qml-qtquick-animatedimage.html#example-usage
// If you want to customize your asset, here's how:
// convert -delay 50 -loop 0 ravens2_*.png ravens.gif
OpacityAnimator on opacity {
playing = (status == AnimatedImage.Ready);
fadeIn.start();
// FIXME - this is a workaround. It will BREAK with i18n
width: 100
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignBottom
capitalization: Font.Capitalize
family: lightFont.name
bold: false
}
HoverHandler {
cursorShape: Qt.PointingHandCursor
}
vpn.startingUI = true;
backend.switchOn();
console.debug("unknown state");
return ctx != undefined && ctx.snowflake == "true" && ctx.snowflakeProgress != "100";