Skip to content
Snippets Groups Projects
Commit b0fe0251 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

Reply: ellide too long display names

GitLab: #1550
Change-Id: I0234d9c6993438fe4580961a85d86632def1c354
parent 1ec2d5f2
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,15 @@ Control {
Label {
id: replyTo
text: isOutgoing ? JamiStrings.inReplyTo : UtilsAdapter.getBestNameForUri(CurrentAccount.id, Author) + JamiStrings.repliedTo
wrapMode: Text.NoWrap
text: textMetricsUsername1.elidedText
TextMetrics {
id: textMetricsUsername1
text: isOutgoing ? JamiStrings.inReplyTo : UtilsAdapter.getBestNameForUri(CurrentAccount.id, Author) + JamiStrings.repliedTo
elideWidth: 200
elide: Qt.ElideMiddle
}
color: JamiTheme.messageReplyColor
font.pointSize: JamiTheme.textFontSize
font.kerning: true
......@@ -175,7 +183,15 @@ Control {
Label {
id: replyToUserName
text: replyItem.isSelf ? JamiStrings.inReplyToMe : replyToLayout.replyUserName
wrapMode: Text.NoWrap
text: textMetricsUsername2.elidedText
TextMetrics {
id: textMetricsUsername2
text: replyItem.isSelf ? JamiStrings.inReplyToMe : replyToLayout.replyUserName
elideWidth: 200
elide: Qt.ElideMiddle
}
color: JamiTheme.messageReplyColor
font.pointSize: JamiTheme.textFontSize
font.kerning: true
......
......@@ -78,7 +78,14 @@ Rectangle {
Label {
id: username
text: author === CurrentAccount.uri ? CurrentAccount.bestName : UtilsAdapter.getBestNameForUri(CurrentAccount.id, author)
wrapMode: Text.NoWrap
text: textMetricsUsername.elidedText
TextMetrics {
id: textMetricsUsername
text: author === CurrentAccount.uri ? CurrentAccount.bestName : UtilsAdapter.getBestNameForUri(CurrentAccount.id, author)
elideWidth: 200
elide: Qt.ElideMiddle
}
color: UtilsAdapter.luma(root.color) ? JamiTheme.chatviewTextColorLight : JamiTheme.chatviewTextColorDark
font.pointSize: JamiTheme.textFontSize
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment