feat(ModalPopup): hide footer section if footerContent height is 0

In the recent past we've improved our `ModalPopup` to allow for a bit more control
when it comes to rendering a modal footer section with call-to-action items.

The footer section is rendered when there's `footerContent` and when the height
of the footer content is > 0. This means it's possible to also hide the footer content
section from the modal, even when there's footer content children.

However, there's a separator rendered whenver the footer is visible, regardless of its
height. This results in undesired behaviour when rendering footer children of height 0.

To avoid this, this commit adjust the condition so that the separator is only rendered
when the footer visible AND the height of it is > 0.
This commit is contained in:
Pascal Precht 2021-03-16 13:14:07 +01:00 committed by Iuri Matias
parent f1e83f74bc
commit 79338f76be
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ Popup {
Separator {
id: separator2
visible: footerContent.visible
visible: footerContent.visible && footerContent.height > 0
anchors.bottom: footerContent.top
anchors.bottomMargin: visible ? Style.current.padding : 0
}