From cb2ea5f4e30749ef993671fbc55f21155d7b2640 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 20 Sep 2021 23:31:36 +0200 Subject: [PATCH] Allow TextDelegate to wrap anywhere if required Prevents lines from going out of the message bubble --- imports/NeoChat/Component/Timeline/ReplyComponent.qml | 1 - imports/NeoChat/Component/Timeline/TextDelegate.qml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/imports/NeoChat/Component/Timeline/ReplyComponent.qml b/imports/NeoChat/Component/Timeline/ReplyComponent.qml index 70c60eb7e..cff881ff0 100644 --- a/imports/NeoChat/Component/Timeline/ReplyComponent.qml +++ b/imports/NeoChat/Component/Timeline/ReplyComponent.qml @@ -79,7 +79,6 @@ MouseArea { id: replyText textMessage: reply.display textFormat: Text.RichText - wrapMode: Text.WordWrap width: Math.min(implicitWidth, bubbleMaxWidth - Kirigami.Units.largeSpacing * 3) x: Kirigami.Units.smallSpacing * 3 + avatatReply.width } diff --git a/imports/NeoChat/Component/Timeline/TextDelegate.qml b/imports/NeoChat/Component/Timeline/TextDelegate.qml index 5d79c8d6c..61e238cc1 100644 --- a/imports/NeoChat/Component/Timeline/TextDelegate.qml +++ b/imports/NeoChat/Component/Timeline/TextDelegate.qml @@ -50,7 +50,7 @@ a{ font.pointSize: model.reply === undefined && isEmoji.test(model.display) ? Kirigami.Theme.defaultFont.pointSize * 4 : Kirigami.Theme.defaultFont.pointSize selectByMouse: !Kirigami.Settings.isMobile readOnly: true - wrapMode: Text.WordWrap + wrapMode: Text.Wrap textFormat: Text.RichText Layout.fillWidth: true