summaryrefslogtreecommitdiff
path: root/gui/components/ErrorBox.qml
diff options
context:
space:
mode:
Diffstat (limited to 'gui/components/ErrorBox.qml')
-rw-r--r--gui/components/ErrorBox.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/gui/components/ErrorBox.qml b/gui/components/ErrorBox.qml
new file mode 100644
index 0000000..40c12d0
--- /dev/null
+++ b/gui/components/ErrorBox.qml
@@ -0,0 +1,33 @@
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+import QtGraphicalEffects 1.0
+import "../themes/themes.js" as Theme
+
+Item {
+ id: errorBox
+ width: parent.width
+ property var errorText: ""
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: connectionImage.bottom
+
+ // TODO alert icon, by type
+
+ Rectangle {
+
+ id: labelWrapper
+ color: "transparent"
+ height: label.paintedHeight + Theme.windowMargin
+ width: parent.width
+ anchors.verticalCenter: parent.verticalCenter
+
+ Label {
+ id: label
+ width: labelWrapper.width - Theme.windowMargin
+ anchors.centerIn: parent
+ text: errorBox.errorText //+ " " + "<b><u>" + alertLinkText + "</b></u>"
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Text.Wrap
+ font.pixelSize: Theme.fontSizeSmall
+ }
+ }
+}