Room settings: add room ID text area + copy button

The only way to see a room's ID previously was to right click a room in
the left pane, copy option, and paste it somewhere.
This commit is contained in:
miruka
2021-04-09 11:36:43 -04:00
parent 1d29e47818
commit bcb9ffcf9d
2 changed files with 29 additions and 1 deletions

View File

@@ -16,9 +16,11 @@ HButton {
toolTip.label.wrapMode: HLabel.NoWrap
onClicked: {
const oldPosition = textControl.cursorPosition
textControl.selectAll()
textControl.copy()
textControl.deselect()
textControl.cursorPosition = oldPosition
toolTip.text = qsTr("Copied!")
toolTip.instantShow(2000)