summaryrefslogtreecommitdiff
path: root/gui/components/MotdBox.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-11-29 01:45:42 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-11-29 18:14:15 +0100
commitebcef0d57b6ecb5a40c6579f6be07182dd3033ba (patch)
treec46992ece256c11912c50d3e74f1d8d4085b3c46 /gui/components/MotdBox.qml
parentb7b19b7195366dbacc4078b5b7a3fc6a3ad7889b (diff)
[gui] motd/upgrade style
Diffstat (limited to 'gui/components/MotdBox.qml')
-rw-r--r--gui/components/MotdBox.qml45
1 files changed, 45 insertions, 0 deletions
diff --git a/gui/components/MotdBox.qml b/gui/components/MotdBox.qml
new file mode 100644
index 0000000..3d833a3
--- /dev/null
+++ b/gui/components/MotdBox.qml
@@ -0,0 +1,45 @@
+import QtQuick 2.9
+import QtQuick.Controls 2.2
+import QtGraphicalEffects 1.0
+import "../themes/themes.js" as Theme
+
+Item {
+ id: motdBox
+ width: parent.width
+ property var motdText: ""
+ property var motdLink: ""
+ property var url: ""
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ 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: motdBox.motdText
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Text.Wrap
+ font.pixelSize: Theme.fontSizeSmall - 2
+ }
+
+ Label {
+ id: link
+ color: Theme.green
+ width: labelWrapper.width - Theme.windowMargin
+ anchors.top: label.bottom
+ anchors.topMargin: 10
+ text: motdBox.motdLink
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Label.Wrap
+ font.pixelSize: Theme.fontSizeSmall
+ onLinkActivated: Qt.openUrlExternally(link)
+ }
+ }
+}