mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-10 13:46:35 +00:00
fix: fix PopupModal to not show a footer at all if there is no children
This commit is contained in:
parent
39d72c5f79
commit
e459d4dbd4
@ -102,7 +102,7 @@ ModalPopup {
|
||||
|
||||
footer: Item {
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
height: removeBtn.height
|
||||
|
||||
StatusButton {
|
||||
id: removeBtn
|
||||
|
@ -51,10 +51,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: root.bottom
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
height: okButton.height
|
||||
|
||||
StyledButton {
|
||||
id: okButton
|
||||
|
@ -192,9 +192,8 @@ ModalPopup {
|
||||
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnReject.height
|
||||
|
||||
StatusButton {
|
||||
id: btnReject
|
||||
|
@ -122,9 +122,9 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnNext.height
|
||||
|
||||
StatusRoundButton {
|
||||
id: btnBack
|
||||
anchors.left: parent.left
|
||||
|
@ -227,9 +227,9 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnNext.height
|
||||
|
||||
StatusRoundButton {
|
||||
id: btnBack
|
||||
anchors.left: parent.left
|
||||
|
@ -127,9 +127,11 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.fill: parent
|
||||
width: parent.width
|
||||
height: importBtn.height
|
||||
|
||||
StatusButton {
|
||||
id: importBtn
|
||||
text: qsTr("Import a community")
|
||||
anchors.right: createBtn.left
|
||||
anchors.rightMargin: Style.current.smallPadding
|
||||
|
@ -140,7 +140,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.fill: parent
|
||||
width: parent.width
|
||||
height: backButton.height
|
||||
|
||||
StatusIconButton {
|
||||
id: backButton
|
||||
|
@ -86,7 +86,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.fill: parent
|
||||
width: parent.width
|
||||
height: inviteBtn.height
|
||||
|
||||
StatusRoundButton {
|
||||
id: btnBack
|
||||
|
@ -136,10 +136,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: popup.bottom
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
height: btnSelectMembers.height
|
||||
|
||||
Button {
|
||||
id: btnSelectMembers
|
||||
|
@ -101,7 +101,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.fill:parent
|
||||
width: parent.width
|
||||
height: uploadBtn.height
|
||||
|
||||
StatusButton {
|
||||
visible: profileModel.profile.hasIdentityImage
|
||||
|
@ -85,10 +85,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: popup.bottom
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
height: btnSelectPreferred.height
|
||||
|
||||
Button {
|
||||
id: btnSelectPreferred
|
||||
|
@ -149,9 +149,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnNext.height
|
||||
|
||||
StatusButton {
|
||||
id: btnNext
|
||||
|
@ -153,9 +153,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnNext.height
|
||||
|
||||
StyledButton {
|
||||
id: btnNext
|
||||
|
@ -105,7 +105,9 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.fill: parent
|
||||
width: parent.width
|
||||
height: saveBtn.height
|
||||
|
||||
StyledButton {
|
||||
visible: currentAccount.walletType === Constants.watchWalletType
|
||||
anchors.top: parent.top
|
||||
|
@ -131,8 +131,10 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
width: parent.width
|
||||
height: addBtn.height
|
||||
visible: editable
|
||||
anchors.fill: parent
|
||||
|
||||
StyledButton {
|
||||
id: addBtn
|
||||
anchors.top: parent.top
|
||||
|
@ -181,9 +181,9 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnNext.height
|
||||
|
||||
StatusRoundButton {
|
||||
id: btnBack
|
||||
anchors.left: parent.left
|
||||
|
@ -75,9 +75,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnRemindLater.height
|
||||
|
||||
StatusButton {
|
||||
anchors.right: btnRemindLater.left
|
||||
|
@ -92,10 +92,8 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: popup.bottom
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
height: submitBtn.height
|
||||
|
||||
StatusButton {
|
||||
id: submitBtn
|
||||
|
@ -56,12 +56,11 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: popup.bottom
|
||||
anchors.left: parent.left
|
||||
width: parent.width
|
||||
height: reencryptBtn.height
|
||||
|
||||
StatusButton {
|
||||
id: reencryptBtn
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.right: parent.right
|
||||
|
@ -126,24 +126,22 @@ Popup {
|
||||
|
||||
Separator {
|
||||
id: separator2
|
||||
visible: !!footerContent.children[0]
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 75
|
||||
visible: footerContent.visible
|
||||
anchors.bottom: footerContent.top
|
||||
anchors.bottomMargin: visible ? Style.current.padding : 0
|
||||
}
|
||||
|
||||
Item {
|
||||
id: footerContent
|
||||
visible: !!children[0]
|
||||
height: children[0] && children[0].height
|
||||
visible: children.length > 0
|
||||
height: visible ? children[0] && children[0].height : 0
|
||||
width: parent.width
|
||||
anchors.top: separator2.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.topMargin: Style.current.padding
|
||||
anchors.bottomMargin: Style.current.padding
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.bottomMargin: visible ? Style.current.padding : 0
|
||||
anchors.rightMargin: visible ? Style.current.padding : 0
|
||||
anchors.leftMargin: visible ? Style.current.padding : 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -165,9 +165,9 @@ ModalPopup {
|
||||
}
|
||||
|
||||
footer: Item {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
width: parent.width
|
||||
height: btnNext.height
|
||||
|
||||
StatusRoundButton {
|
||||
id: btnBack
|
||||
anchors.left: parent.left
|
||||
|
Loading…
x
Reference in New Issue
Block a user