diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-04-29 23:38:45 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-04-29 23:38:45 +0200 |
commit | 2d678bdcf6d23dc82ad5edbb55443003e170fca3 (patch) | |
tree | 54491fffb9b3e78c561f1d065cd4afe64a0eee04 /resources/qml/delegates | |
parent | Copy address location (diff) | |
download | nheko-2d678bdcf6d23dc82ad5edbb55443003e170fca3.tar.xz |
Allow copying messages via right click
fixes #291
Diffstat (limited to 'resources/qml/delegates')
-rw-r--r-- | resources/qml/delegates/TextMessage.qml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml index 1624d95c..f44165b4 100644 --- a/resources/qml/delegates/TextMessage.qml +++ b/resources/qml/delegates/TextMessage.qml @@ -7,6 +7,7 @@ import im.nheko 1.0 MatrixText { property string formatted: model.data.formattedBody + property string copyText: selectedText ? getText(selectionStart, selectionEnd) : model.data.body text: "<style type=\"text/css\">a { color:" + colors.link + ";}\ncode { background-color: " + colors.alternateBase + ";}</style>" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + colors.alternateBase + "'>") width: parent ? parent.width : undefined |