uiux(Chat): ensure emojis are centered vertically within messages

Closes #227
This commit is contained in:
Pascal Precht 2021-04-20 17:25:00 +02:00 committed by Iuri Matias
parent 9dc51b82fd
commit b36652348a
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,7 @@ Item {
Item {
id: messageContent
height: childrenRect.height + Style.current.halfPadding
height: childrenRect.height + (isEmoji ? 2 : 0)
anchors.top: chatName.visible ? chatName.bottom : parent.top
anchors.left: chatImage.right
anchors.leftMargin: root.chatHorizontalPadding
@ -118,6 +118,7 @@ Item {
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + root.chatHorizontalPadding
id: chatText
anchors.top: chatReply.active ? chatReply.bottom : parent.top
anchors.topMargin: isEmoji ? 2 : 0
anchors.left: parent.left
anchors.right: parent.right
// using a padding instead of a margin let's us select text more easily