[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:
@@ -49,10 +49,10 @@ Loader {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: fontMetrics.leading
|
spacing: fontMetrics.leading
|
||||||
Label {
|
Label {
|
||||||
textFormat: TextEdit.RichText
|
Layout.fillWidth: true
|
||||||
wrapMode: Label.Wrap
|
textFormat: Text.StyledText
|
||||||
|
elide: Text.ElideRight
|
||||||
text: {
|
text: {
|
||||||
let stylesheet = "<style>.user-pill{}</style>"
|
|
||||||
let heading = "<b>%1</b>"
|
let heading = "<b>%1</b>"
|
||||||
let userName = user ? "<font color=\""+ user.color +"\">" + user.displayName + "</font>" : ""
|
let userName = user ? "<font color=\""+ user.color +"\">" + user.displayName + "</font>" : ""
|
||||||
if (isEdit) {
|
if (isEdit) {
|
||||||
@@ -61,7 +61,7 @@ Loader {
|
|||||||
heading = heading.arg(i18n("Replying to %1:", userName))
|
heading = heading.arg(i18n("Replying to %1:", userName))
|
||||||
}
|
}
|
||||||
|
|
||||||
return stylesheet + heading
|
return heading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ScrollView {
|
ScrollView {
|
||||||
|
|||||||
Reference in New Issue
Block a user