From b36652348a72e0e29282a25f1aa78fd6a26051fc Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 20 Apr 2021 17:25:00 +0200 Subject: [PATCH] uiux(Chat): ensure emojis are centered vertically within messages Closes #227 --- .../Chat/ChatColumn/MessageComponents/CompactMessage.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml index a5af8dff80..2b5b03afae 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/CompactMessage.qml @@ -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