From 4c780c60ec6ce9425b3fc87be30fd0ee7d614159 Mon Sep 17 00:00:00 2001 From: "B.Melnik" Date: Mon, 14 Jun 2021 15:01:25 +0300 Subject: [PATCH] feat(Popups): Add StatusModalFooter --- .../Popups/statusModal/StatusModalFooter.qml | 68 +++++++++++++++++++ .../src/assets/img/icons/arrow-left.svg | 3 + 2 files changed, 71 insertions(+) create mode 100644 ui/StatusQ/src/StatusQ/Popups/statusModal/StatusModalFooter.qml create mode 100644 ui/StatusQ/src/assets/img/icons/arrow-left.svg diff --git a/ui/StatusQ/src/StatusQ/Popups/statusModal/StatusModalFooter.qml b/ui/StatusQ/src/StatusQ/Popups/statusModal/StatusModalFooter.qml new file mode 100644 index 0000000000..737bcfcf0d --- /dev/null +++ b/ui/StatusQ/src/StatusQ/Popups/statusModal/StatusModalFooter.qml @@ -0,0 +1,68 @@ +import QtQuick 2.14 +import QtQuick.Layouts 1.14 + +import StatusQ.Core 0.1 +import StatusQ.Core.Theme 0.1 +import StatusQ.Components 0.1 +import StatusQ.Controls 0.1 + + +Rectangle { + id: statusModalFooter + + property bool showBack: true + + property list buttons + + color: Theme.palette.statusModal.backgroundColor + + signal clicked(var buttonIndex) + signal back + + radius: 6 + + color: Theme.palette.indirectColor1 + + onButtonsChanged: { + for (let idx in buttons) { + buttons[idx].parent = buttonsLayout + } + } + + implicitHeight: rootLayout.implicitHeight + 30 + + RowLayout { + id: rootLayout + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.right: parent.right + anchors.leftMargin: 16 + anchors.rightMargin: 18 + + StatusRoundButton { + Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft + icon.name: "arrow-left" + visible: statusModalFooter.showBack + } + + Item { + Layout.fillWidth: true + implicitHeight: 1 + } + + Row { + id: buttonsLayout + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight + + spacing: 16 + + } + } + + Rectangle { + anchors.top: parent.top + width: parent.width + height: parent.radius + color: parent.color + } +} diff --git a/ui/StatusQ/src/assets/img/icons/arrow-left.svg b/ui/StatusQ/src/assets/img/icons/arrow-left.svg new file mode 100644 index 0000000000..5799a3de69 --- /dev/null +++ b/ui/StatusQ/src/assets/img/icons/arrow-left.svg @@ -0,0 +1,3 @@ + + +