From 72100f4700a7373d842c85d1e7906b66905c79dd Mon Sep 17 00:00:00 2001 From: cberthet <capucine.berthet@savoirfairelinux.com> Date: Wed, 13 Dec 2023 16:27:31 -0500 Subject: [PATCH] ChatView: resolve overlaping issue on username Change-Id: Iee98257740c54d28f2abc1d62458a90c1e218481 --- src/app/commoncomponents/SBSMessageBase.qml | 29 ++++++++------------- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/app/commoncomponents/SBSMessageBase.qml b/src/app/commoncomponents/SBSMessageBase.qml index 889144237..744dfe80d 100644 --- a/src/app/commoncomponents/SBSMessageBase.qml +++ b/src/app/commoncomponents/SBSMessageBase.qml @@ -97,21 +97,16 @@ Control { Layout.fillHeight: true } - Item { - id: usernameblock - Layout.preferredHeight: (seq === MsgSeq.first || seq === MsgSeq.single) ? 10 : 0 - visible: !isReply - - Label { - id: username - text: UtilsAdapter.getBestNameForUri(CurrentAccount.id, Author) - visible: (seq === MsgSeq.first || seq === MsgSeq.single) && !isOutgoing - font.pointSize: JamiTheme.smallFontSize - color: JamiTheme.chatviewSecondaryInformationColor - lineHeight: JamiTheme.usernameBlockLineHeight - leftPadding: JamiTheme.usernameBlockPadding - textFormat: TextEdit.PlainText - } + + Label { + id: username + text: UtilsAdapter.getBestNameForUri(CurrentAccount.id, Author) + visible: (seq === MsgSeq.first || seq === MsgSeq.single) && !isOutgoing && !isReply + + font.pointSize: JamiTheme.smallFontSize + color: JamiTheme.chatviewSecondaryInformationColor + leftPadding: JamiTheme.usernameBlockPadding + textFormat: TextEdit.PlainText } Item { @@ -211,7 +206,7 @@ Control { id: msgRowlayout Layout.preferredHeight: innerContent.height + root.extraHeight + (emojiReactions.emojis === "" ? 0 : emojiReactions.height - 8) + (IsEmojiOnly && (root.seq === MsgSeq.last || root.seq === MsgSeq.single) && emojiReactions.emojis === "" ? 15 : 0) - Layout.topMargin: ((seq === MsgSeq.first || seq === MsgSeq.single) && !root.isReply) ? 6 : 0 + Layout.topMargin: ((seq === MsgSeq.first || seq === MsgSeq.single) && !root.isReply) ? 3.5 : 0 Layout.bottomMargin: root.bigMsg ? timestampItem.timeLabel.height : 0 Item { @@ -237,8 +232,6 @@ Control { Layout.fillHeight: true Layout.fillWidth: true - - Column { id: innerContent -- GitLab