1 files changed, 8 insertions, 7 deletions
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index 1eb5e2c0..d4b72965 100644
--- a/resources/qml/delegates/TextMessage.qml
+++ b/resources/qml/delegates/TextMessage.qml
@@ -3,17 +3,19 @@
// SPDX-License-Identifier: GPL-3.0-or-later
import ".."
-import QtQuick.Controls 2.3
-import im.nheko 1.0
+import QtQuick.Controls
+import QtQuick.Layouts
+import im.nheko
MatrixText {
required property string body
required property bool isOnlyEmoji
required property bool isReply
required property bool keepFullText
- required property string formatted
+ required property string formattedBody
+
property string copyText: selectedText ? getText(selectionStart, selectionEnd) : body
- property int metadataWidth
+ property int metadataWidth: 100
property bool fitsMetadata: false //positionAt(width,height-4) == positionAt(width-metadataWidth-10, height-4)
// table border-collapse doesn't seem to work
@@ -38,9 +40,8 @@ MatrixText {
background-color: " + palette.text + ";
}" : "") + // TODO(Nico): Figure out how to support mobile
"</style>
- " + formatted.replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
- width: parent?.width ?? 0
- height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
+ " + formattedBody.replace(/<del>/g, "<s>").replace(/<\/del>/g, "</s>").replace(/<strike>/g, "<s>").replace(/<\/strike>/g, "</s>")
+ Layout.maximumHeight: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
clip: !keepFullText
selectByMouse: !Settings.mobileMode && !isReply
enabled: !Settings.mobileMode
|