Updated main tap badge. Fixes #1619

This commit is contained in:
staked-smart-ace 2021-01-16 01:16:48 +04:00 committed by Jonathan Rainville
parent 78479749c6
commit 2de8faf5a5
1 changed files with 15 additions and 35 deletions

View File

@ -209,24 +209,17 @@ RowLayout {
anchors.leftMargin: -16 anchors.leftMargin: -16
anchors.topMargin: 1 anchors.topMargin: 1
radius: height / 2 radius: height / 2
color: Style.current.white color: Style.current.blue
border.color: Style.current.background
border.width: 2
width: chatsModel.unreadMessagesCount < 10 ? 22 : messageCount.width + 14 width: chatsModel.unreadMessagesCount < 10 ? 22 : messageCount.width + 14
height: 22 height: 22
Text {
Rectangle { id: messageCount
anchors.centerIn: parent font.pixelSize: chatsModel.unreadMessagesCount > 99 ? 10 : 12
width: parent.width - 4 color: Style.current.white
height: parent.height - 4 anchors.centerIn: parent
radius: height / 2 text: chatsModel.unreadMessagesCount > 99 ? "99+" : chatsModel.unreadMessagesCount
color: Style.current.blue
Text {
id: messageCount
font.pixelSize: chatsModel.unreadMessagesCount > 99 ? 10 : 12
color: Style.current.white
anchors.centerIn: parent
text: chatsModel.unreadMessagesCount > 99 ? "99+" : chatsModel.unreadMessagesCount
}
} }
} }
} }
@ -263,26 +256,13 @@ RowLayout {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.right anchors.left: parent.right
anchors.leftMargin: -17 anchors.leftMargin: -17
anchors.topMargin: -2 anchors.topMargin: 5
radius: height / 2 radius: height / 2
color: Style.current.white color: Style.current.blue
width: 22 border.color: Style.current.background
height: 22 border.width: 2
width: 14
Rectangle { height: 14
anchors.centerIn: parent
width: parent.width - 4
height: parent.height - 4
radius: height / 2
color: Style.current.blue
Text {
font.pixelSize: 12
color: Style.current.white
anchors.centerIn: parent
text: "1"
}
}
} }
} }