feat(Popups): Add StatusModalFooter
This commit is contained in:
parent
fa9bb7adc6
commit
9c2a5830f3
|
@ -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<StatusBaseButton> 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
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg width="22" height="16" viewBox="0 0 22 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9.28547 1.61872C9.62717 1.27701 9.62717 0.72299 9.28547 0.381282C8.94376 0.0395728 8.38974 0.0395728 8.04803 0.381282L1.04803 7.38128C0.706321 7.72299 0.706321 8.27701 1.04803 8.61872L8.04803 15.6187C8.38974 15.9604 8.94376 15.9604 9.28547 15.6187C9.62717 15.277 9.62717 14.723 9.28547 14.3813L4.775 9.87081C4.40752 9.50333 4.66778 8.875 5.18748 8.875H20.3334C20.8167 8.875 21.2084 8.48325 21.2084 8C21.2084 7.51675 20.8167 7.125 20.3334 7.125H5.18748C4.66778 7.125 4.40752 6.49667 4.775 6.12919L9.28547 1.61872Z" fill="#88B0FF"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 644 B |
Loading…
Reference in New Issue