uiux(Communities): fine-tune header button component to align with designs

This commit is contained in:
Pascal Precht 2021-04-09 11:13:09 +02:00 committed by Iuri Matias
parent bf67c941ff
commit b76468e675
1 changed files with 21 additions and 18 deletions

View File

@ -47,27 +47,30 @@ Button {
}
StyledText {
id: communityName
text: chatsModel.communities.activeCommunity.name
Item {
height: childrenRect.height
width: childrenRect.width
anchors.left: communityImage.right
anchors.leftMargin: Style.current.halfPadding
anchors.top: parent.top
font.pixelSize: 15
font.weight: Font.Medium
}
anchors.verticalCenter: parent.verticalCenter
StyledText {
id: communityNbMember
text: chatsModel.communities.activeCommunity.nbMembers === 1 ?
qsTr("1 member") :
qsTr("%1 members").arg(chatsModel.communities.activeCommunity.nbMembers)
anchors.left: communityName.left
anchors.top: communityName.bottom
font.pixelSize: 12
font.weight: Font.Thin
color: Style.current.secondaryText
StyledText {
id: communityName
text: chatsModel.communities.activeCommunity.name
font.pixelSize: 15
font.weight: Font.Bold
}
StyledText {
id: communityNbMember
text: chatsModel.communities.activeCommunity.nbMembers === 1 ?
qsTr("1 member") :
qsTr("%1 members").arg(chatsModel.communities.activeCommunity.nbMembers)
anchors.left: communityName.left
anchors.top: communityName.bottom
font.pixelSize: 14
color: Style.current.secondaryText
}
}
}