uiux(Chat): ensure emojis are centered vertically within messages
Closes #227
This commit is contained in:
parent
9dc51b82fd
commit
b36652348a
|
@ -99,7 +99,7 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: messageContent
|
id: messageContent
|
||||||
height: childrenRect.height + Style.current.halfPadding
|
height: childrenRect.height + (isEmoji ? 2 : 0)
|
||||||
anchors.top: chatName.visible ? chatName.bottom : parent.top
|
anchors.top: chatName.visible ? chatName.bottom : parent.top
|
||||||
anchors.left: chatImage.right
|
anchors.left: chatImage.right
|
||||||
anchors.leftMargin: root.chatHorizontalPadding
|
anchors.leftMargin: root.chatHorizontalPadding
|
||||||
|
@ -118,6 +118,7 @@ Item {
|
||||||
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + root.chatHorizontalPadding
|
readonly property int leftPadding: chatImage.anchors.leftMargin + chatImage.width + root.chatHorizontalPadding
|
||||||
id: chatText
|
id: chatText
|
||||||
anchors.top: chatReply.active ? chatReply.bottom : parent.top
|
anchors.top: chatReply.active ? chatReply.bottom : parent.top
|
||||||
|
anchors.topMargin: isEmoji ? 2 : 0
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// using a padding instead of a margin let's us select text more easily
|
// using a padding instead of a margin let's us select text more easily
|
||||||
|
|
Loading…
Reference in New Issue