[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
This commit is contained in:
Noah Davis
2021-04-07 12:07:47 -04:00
parent 2cb81d1276
commit aa2d332b89

View File

@@ -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 = "<style>.user-pill{}</style>"
let heading = "<b>%1</b>"
let userName = user ? "<font color=\""+ user.color +"\">" + user.displayName + "</font>" : ""
if (isEdit) {
@@ -61,7 +61,7 @@ Loader {
heading = heading.arg(i18n("Replying to %1:", userName))
}
return stylesheet + heading
return heading
}
}
ScrollView {