refactor(Communities): make membershipt request button looks as designed

The designs for the membership request button look different now, so this
commit makes use of the `StatusSettingsLineButton` to implement that new
look & feel.
This commit is contained in:
Pascal Precht 2021-03-16 16:16:10 +01:00
parent ea39ead64b
commit 362ad02ffc
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
1 changed files with 13 additions and 5 deletions

View File

@ -29,6 +29,7 @@ Item {
}
}
}
Separator {
id: sep
anchors.left: parent.left
@ -39,14 +40,21 @@ Item {
anchors.rightMargin: -Style.current.padding
}
MembershipRequestsButton {
StatusSettingsLineButton {
id: membershipRequestsBtn
text: qsTr("Membership requests")
badgeText: chatsModel.communities.activeCommunity.communityMembershipRequests.nbRequests.toString()
visible: chatsModel.communities.activeCommunity.communityMembershipRequests.nbRequests > 0
badgeSize: 22
badgeRadius: badgeSize / 2
isBadge: true
height: 64
anchors.top: sep.bottom
anchors.topMargin: visible ? Style.current.smallPadding : 0
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: -Style.current.padding
anchors.rightMargin: -Style.current.padding
anchors.leftMargin: 0
anchors.rightMargin: 0
onClicked: membershipRequestPopup.open()
}
Separator {