fix(StatusModal): render footer correctly based on `showFooter` flag

This commit is contained in:
Pascal Precht 2021-10-29 13:28:49 +02:00 committed by r4bbit.eth
parent d301b94c70
commit da9dc2f46a
2 changed files with 5 additions and 3 deletions

View File

@ -67,7 +67,7 @@ QC.Popup {
id: footerImpl
anchors.bottom: parent.bottom
width: visible ? parent.width : 0
visible: statusModal.showFooter
showFooter: statusModal.showFooter
}
}
}

View File

@ -13,6 +13,7 @@ Rectangle {
property list<Item> leftButtons
property list<StatusBaseButton> rightButtons
property bool showFooter: true
radius: 8
@ -30,7 +31,7 @@ Rectangle {
}
}
implicitHeight: visible ? rootLayout.implicitHeight + 30 : 0
implicitHeight: rootLayout.implicitHeight + 30
RowLayout {
id: rootLayout
@ -43,6 +44,7 @@ Rectangle {
Row {
id: leftButtonsLayout
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
visible: statusModalFooter.showFooter
spacing: 16
}
@ -55,9 +57,9 @@ Rectangle {
Row {
id: rightButtonsLayout
Layout.alignment: Qt.AlignVCenter | Qt.AlignRight
visible: statusModalFooter.showFooter
spacing: 16
}
}