From aa2d332b89ac914cc3ef6377c16e080000ac5c43 Mon Sep 17 00:00:00 2001 From: Noah Davis Date: Wed, 7 Apr 2021 12:07:47 -0400 Subject: [PATCH] [ReplyPane] Make reply/edit Label fillWidth and elide usernames Also removes a stylesheet that seemed to do nothing so that StyledText can be used instead of RichText, which is more light weight. fixes #336 --- imports/NeoChat/Component/ChatBox/ReplyPane.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/imports/NeoChat/Component/ChatBox/ReplyPane.qml b/imports/NeoChat/Component/ChatBox/ReplyPane.qml index c2fe91d62..3696db418 100644 --- a/imports/NeoChat/Component/ChatBox/ReplyPane.qml +++ b/imports/NeoChat/Component/ChatBox/ReplyPane.qml @@ -49,10 +49,10 @@ Loader { Layout.fillWidth: true spacing: fontMetrics.leading Label { - textFormat: TextEdit.RichText - wrapMode: Label.Wrap + Layout.fillWidth: true + textFormat: Text.StyledText + elide: Text.ElideRight text: { - let stylesheet = "" let heading = "%1" let userName = user ? "" + user.displayName + "" : "" if (isEdit) { @@ -61,7 +61,7 @@ Loader { heading = heading.arg(i18n("Replying to %1:", userName)) } - return stylesheet + heading + return heading } } ScrollView {