summaryrefslogtreecommitdiff
path: root/gui/components/ErrorBox.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-08-31 21:59:35 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-11-23 21:50:59 +0100
commit815c26850266eba2e4e5d02509487452624b1c64 (patch)
tree48aeca1a7e52003127e6924ef71cf539a034b903 /gui/components/ErrorBox.qml
parentcd1d46a26b923260b6c87cc93a0723b8166c609e (diff)
[ui] fonts + bugfixing
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
+ }
+ }
+}