diff options
author | Malte E <97891689+maltee1@users.noreply.github.com> | 2022-03-20 05:12:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-20 04:12:41 +0000 |
commit | a42335aed2cc44591fa836a0911eaef07e345250 (patch) | |
tree | 4b636425f73e199d055467a5f0f1e46bdee83027 /resources/qml/delegates | |
parent | Added translation using Weblate (Vietnamese) (diff) | |
download | nheko-a42335aed2cc44591fa836a0911eaef07e345250.tar.xz |
elide usernames in timeline (#997)
* Use advanceWidth to get the with of the original text Co-authored-by: Nicolas Werner <nicolas.werner@hotmail.de>
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r-- | resources/qml/delegates/Reply.qml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml index f5756390..513b7c0b 100644 --- a/resources/qml/delegates/Reply.qml +++ b/resources/qml/delegates/Reply.qml @@ -9,6 +9,7 @@ import QtQuick.Controls 2.3 import QtQuick.Layouts 1.2 import QtQuick.Window 2.13 import im.nheko 1.0 +import "../" Item { id: r @@ -39,7 +40,7 @@ Item { height: replyContainer.height implicitHeight: replyContainer.height - implicitWidth: visible? colorLine.width+replyContainer.implicitWidth : 0 + implicitWidth: visible? colorLine.width+Math.max(replyContainer.implicitWidth,userName_.fullTextWidth) : 0 // visible? seems to be causing issues CursorShape { anchors.fill: parent @@ -83,13 +84,15 @@ Item { } AbstractButton { - id: userName_ Layout.leftMargin: 4 - contentItem: Text { - - text: TimelineManager.escapeEmoji(userName) + Layout.fillWidth: true + contentItem: ElidedLabel { + id: userName_ + fullText: userName color: r.userColor textFormat: Text.RichText + width: parent.width + elideWidth: width } onClicked: room.openUserProfile(userId) } |