From c56dcd9eb47ad8e22d24257b53bbc12ba407357f Mon Sep 17 00:00:00 2001 From: Noelia <97019400+noeliaSD@users.noreply.github.com> Date: Wed, 12 Jan 2022 09:37:17 +0100 Subject: [PATCH] Created new UI component StatusBanner and added into StatusQ/Controls --- src/StatusQ/Controls/StatusBanner.qml | 47 +++++++++++++++++++++++++++ src/StatusQ/Controls/qmldir | 1 + 2 files changed, 48 insertions(+) create mode 100644 src/StatusQ/Controls/StatusBanner.qml diff --git a/src/StatusQ/Controls/StatusBanner.qml b/src/StatusQ/Controls/StatusBanner.qml new file mode 100644 index 00000000..d502bb8d --- /dev/null +++ b/src/StatusQ/Controls/StatusBanner.qml @@ -0,0 +1,47 @@ +import QtQuick 2.14 + +import StatusQ.Core 0.1 + +Column { + id: statusBanner + width: parent.width + + property color backgroundColor + property color bordersColor + property color fontColor + property string statusText + property int textPixels: 15 + property int statusBannerHeight: 38 + + Rectangle { + id: topDiv + color: statusBanner.bordersColor + height: 1 + width: parent.width + } + + // Status banner content: + Rectangle { + id: statusBox + width: parent.width + height: statusBanner.statusBannerHeight + color: statusBanner.backgroundColor + + StatusBaseText { + id: statusTxt + anchors.fill: parent + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: statusBanner.textPixels + text: statusBanner.statusText + color: statusBanner.fontColor + } + } + + Rectangle { + id: bottomDiv + color: statusBanner.bordersColor + height: 1 + width: parent.width + } +} diff --git a/src/StatusQ/Controls/qmldir b/src/StatusQ/Controls/qmldir index 22cc6eda..eda3b64d 100644 --- a/src/StatusQ/Controls/qmldir +++ b/src/StatusQ/Controls/qmldir @@ -2,6 +2,7 @@ module StatusQ.Controls StatusAccountSelector 0.1 StatusAccountSelector.qml StatusAssetSelector 0.1 StatusAssetSelector.qml +StatusBanner 0.1 StatusBanner.qml StatusChatCommandButton 0.1 StatusChatCommandButton.qml StatusChatInfoButton 0.1 StatusChatInfoButton.qml StatusChatListCategoryItemButton 0.1 StatusChatListCategoryItemButton.qml