From 63663b2b2d65f4d94eec4d719f67262bc993f13d Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 21 Feb 2022 14:51:02 +0100 Subject: [PATCH] add simple message pane component --- electrum/gui/qml/components/MessagePane.qml | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 electrum/gui/qml/components/MessagePane.qml diff --git a/electrum/gui/qml/components/MessagePane.qml b/electrum/gui/qml/components/MessagePane.qml new file mode 100644 index 000000000..9be266327 --- /dev/null +++ b/electrum/gui/qml/components/MessagePane.qml @@ -0,0 +1,30 @@ +import QtQuick 2.6 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.1 +import QtQuick.Controls.Material 2.0 + +Rectangle { + id: item + + property bool warning + property bool error + property string text + + color: "transparent" + border.color: error ? "red" : warning ? "yellow" : Material.accentColor + border.width: 1 + height: text.height + 2* 16 + radius: 8 + + Text { + id: text + width: item.width - 2* 16 + x: 16 + y: 16 + + color: item.border.color + text: item.text + wrapMode: Text.Wrap + } + +}