From da9dc2f46ac5b7bc414d16cf4a6b26556fb39796 Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Fri, 29 Oct 2021 13:28:49 +0200 Subject: [PATCH] fix(StatusModal): render footer correctly based on `showFooter` flag --- src/StatusQ/Popups/StatusModal.qml | 2 +- src/StatusQ/Popups/statusModal/StatusModalFooter.qml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/StatusQ/Popups/StatusModal.qml b/src/StatusQ/Popups/StatusModal.qml index 514f4549..ef1c3a8b 100644 --- a/src/StatusQ/Popups/StatusModal.qml +++ b/src/StatusQ/Popups/StatusModal.qml @@ -67,7 +67,7 @@ QC.Popup { id: footerImpl anchors.bottom: parent.bottom width: visible ? parent.width : 0 - visible: statusModal.showFooter + showFooter: statusModal.showFooter } } } diff --git a/src/StatusQ/Popups/statusModal/StatusModalFooter.qml b/src/StatusQ/Popups/statusModal/StatusModalFooter.qml index 5781c2d3..42bc1803 100644 --- a/src/StatusQ/Popups/statusModal/StatusModalFooter.qml +++ b/src/StatusQ/Popups/statusModal/StatusModalFooter.qml @@ -13,6 +13,7 @@ Rectangle { property list leftButtons property list 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 - } }