From ed78c35fda08b697af7570bd8f6f8b113e8d645e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Mon, 27 Nov 2023 09:11:52 -0500 Subject: [PATCH] UserProfile: be able to copy identifier Change-Id: Ib402399f9339f537884f9833169d2c91243008b5 --- src/app/mainview/components/UserProfile.qml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/mainview/components/UserProfile.qml b/src/app/mainview/components/UserProfile.qml index 22f0afad7..7ba7a023d 100644 --- a/src/app/mainview/components/UserProfile.qml +++ b/src/app/mainview/components/UserProfile.qml @@ -182,7 +182,7 @@ BaseModalDialog { Layout.leftMargin: 10 } - Label { + TextEdit { id: contactId Layout.alignment: Qt.AlignLeft Layout.preferredWidth: parent.width - identifierText.width - 35 @@ -191,8 +191,17 @@ BaseModalDialog { font.kerning: true color: JamiTheme.textColor - elide: Text.ElideRight - text: idText + selectByMouse: true + readOnly: true + text: textMetricsContacIdText.elidedText + + TextMetrics { + id: textMetricsContacIdText + font: contactDisplayName.font + text: idText + elideWidth: root.width - 200 + elide: Qt.ElideMiddle + } horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter -- GitLab