From 74ffbdb0a89bd71a4f3199e98c47895e593b6a4c Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 5 Nov 2020 20:47:17 -0400 Subject: [PATCH] Account settings: make user ID label copiable --- src/gui/Pages/AccountSettings/Account.qml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/gui/Pages/AccountSettings/Account.qml b/src/gui/Pages/AccountSettings/Account.qml index adc68c5d..3c166638 100644 --- a/src/gui/Pages/AccountSettings/Account.qml +++ b/src/gui/Pages/AccountSettings/Account.qml @@ -202,14 +202,22 @@ HFlickableColumnPage { } } - HLabel { + HSelectableLabel { + textFormat: HSelectableLabel.RichText + wrapMode: HLabel.Wrap text: qsTr("User ID: %1") .arg(utils.coloredNameHtml("", userId, userId)) - textFormat: Text.StyledText - wrapMode: HLabel.Wrap - lineHeight: 1.1 Layout.fillWidth: true + + TapHandler { + acceptedButtons: Qt.RightButton + onTapped: idMenu.spawn() + } + + HTextContextMenu { + id: idMenu + } } HLabeledItem {