Make account user ID an easily copiable RO field

This commit is contained in:
miruka 2020-11-05 21:19:07 -04:00
parent 6af4cca315
commit 28b25a53ea

View File

@ -202,21 +202,29 @@ HFlickableColumnPage {
} }
} }
HSelectableLabel { HLabeledItem {
textFormat: HSelectableLabel.RichText label.text: qsTr("User ID:")
wrapMode: HLabel.Wrap
text: qsTr("User ID: %1")
.arg(utils.coloredNameHtml("", userId, userId))
Layout.fillWidth: true Layout.fillWidth: true
TapHandler { HRowLayout {
acceptedButtons: Qt.RightButton width: parent.width
onTapped: idMenu.spawn()
HTextArea {
id: idArea
textFormat: HSelectableLabel.RichText
wrapMode: HLabel.Wrap
readOnly: true
radius: 0
text: utils.coloredNameHtml("", userId, userId)
Layout.fillWidth: true
Layout.fillHeight: true
} }
HTextContextMenu { FieldCopyButton {
id: idMenu textControl: idArea
}
} }
} }