From 472490f25754dc1caaaf045f4b9d6e70d49ce6b2 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 5 May 2021 16:56:05 +0200 Subject: [PATCH] Possible fix the freeze found in NeoChat I looked at Tok code and found this as architectural difference in their ListView. --- imports/NeoChat/Component/Timeline/TimelineContainer.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/imports/NeoChat/Component/Timeline/TimelineContainer.qml b/imports/NeoChat/Component/Timeline/TimelineContainer.qml index d721a49d0..b883d8e25 100644 --- a/imports/NeoChat/Component/Timeline/TimelineContainer.qml +++ b/imports/NeoChat/Component/Timeline/TimelineContainer.qml @@ -13,6 +13,7 @@ import NeoChat.Component 1.0 import NeoChat.Dialog 1.0 QQC2.ItemDelegate { + id: messageDelegate default property alias innerObject : column.children readonly property bool sentByMe: author.isLocalUser readonly property bool darkBackground: !sentByMe @@ -71,6 +72,7 @@ QQC2.ItemDelegate { Layout.rightMargin: Kirigami.Units.smallSpacing Layout.bottomMargin: 0 Layout.topMargin: model.showAuthor ? Kirigami.Units.smallSpacing : 0 + Layout.fillWidth: true Kirigami.Avatar { Layout.minimumWidth: Kirigami.Units.gridUnit * 2 @@ -104,15 +106,15 @@ QQC2.ItemDelegate { visible: !model.showAuthor && Config.showAvatarInTimeline } - QQC2.ItemDelegate { + QQC2.Control { id: bubble - Layout.maximumWidth: mainColumn.width - Kirigami.Units.gridUnit * 2 - Kirigami.Units.largeSpacing * 2 implicitHeight: contentItem.implicitHeight + topPadding topPadding: Kirigami.Units.largeSpacing bottomPadding: 0 leftPadding: 0 rightPadding: 0 hoverEnabled: true + Layout.maximumWidth: mainColumn.width - Kirigami.Units.gridUnit * 2 - Kirigami.Units.largeSpacing * 2 contentItem: ColumnLayout { id: column @@ -173,6 +175,9 @@ QQC2.ItemDelegate { border.width: Kirigami.Units.devicePixelRatio } } + Item { + Layout.fillWidth: true + } } Loader { id: loader