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:
parent
f1e83f74bc
commit
79338f76be
|
@ -126,7 +126,7 @@ Popup {
|
||||||
|
|
||||||
Separator {
|
Separator {
|
||||||
id: separator2
|
id: separator2
|
||||||
visible: footerContent.visible
|
visible: footerContent.visible && footerContent.height > 0
|
||||||
anchors.bottom: footerContent.top
|
anchors.bottom: footerContent.top
|
||||||
anchors.bottomMargin: visible ? Style.current.padding : 0
|
anchors.bottomMargin: visible ? Style.current.padding : 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue