fix: change size depending of content

This commit is contained in:
Richard Ramos 2020-07-22 15:21:44 -04:00 committed by Iuri Matias
parent 4b558c8c72
commit c4eb92b5e8
1 changed files with 3 additions and 3 deletions

View File

@ -64,10 +64,10 @@ RowLayout {
anchors.topMargin: -5 anchors.topMargin: -5
radius: 9 radius: 9
color: Style.current.blue color: Style.current.blue
width: childrenRect.width + 10 width: chatsModel.unreadMessagesCount < 10 ? 18 : childrenRect.width + 10
height: childrenRect.height + 5 height: 18
Text { Text {
font.pixelSize: 12 font.pixelSize: chatsModel.unreadMessagesCount > 99 ? 10 : 12
color: Style.current.white color: Style.current.white
anchors.centerIn: parent anchors.centerIn: parent
text: chatsModel.unreadMessagesCount text: chatsModel.unreadMessagesCount