diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index c0266c2c..ad6e7580 100644
--- a/resources/qml/delegates/MessageDelegate.qml
+++ b/resources/qml/delegates/MessageDelegate.qml
@@ -13,7 +13,7 @@ Item {
required property bool isReply
property alias child: chooser.child
- property real implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : width
+// property real implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : width
required property double proportionalHeight
required property int type
required property string typeString
@@ -35,14 +35,17 @@ Item {
required property int encryptionError
required property int relatedEventCacheBuster
- height: chooser.child ? chooser.child.height : Nheko.paddingLarge
+ Layout.preferredHeight: chooser.child ? chooser.child.height : Nheko.paddingLarge
DelegateChooser {
id: chooser
//role: "type" //< not supported in our custom implementation, have to use roleValue
roleValue: type
- anchors.fill: parent
+ //anchors.fill: parent
+
+ anchors.left: parent.left
+ anchors.right: parent.right
DelegateChoice {
roleValue: MtxEvent.UnknownMessage
diff --git a/resources/qml/delegates/Placeholder.qml b/resources/qml/delegates/Placeholder.qml
index 19e48393..f63e62f5 100644
--- a/resources/qml/delegates/Placeholder.qml
+++ b/resources/qml/delegates/Placeholder.qml
@@ -10,6 +10,6 @@ MatrixText {
required property string typeString
text: qsTr("unimplemented event: ") + typeString
- width: parent.width
+// width: parent.width
color: Nheko.inactiveColors.text
}
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
index d148f858..efa959a0 100644
--- a/resources/qml/delegates/Reply.qml
+++ b/resources/qml/delegates/Reply.qml
@@ -35,7 +35,7 @@ Item {
property int encryptionError
property int relatedEventCacheBuster
- width: parent.width
+ Layout.preferredHeight: replyContainer.height
height: replyContainer.height
CursorShape {
@@ -52,12 +52,12 @@ Item {
color: TimelineManager.userColor(userId, Nheko.colors.base)
}
- Column {
+ ColumnLayout {
id: replyContainer
anchors.left: colorLine.right
- anchors.leftMargin: 4
width: parent.width - 8
+ spacing: 0
TapHandler {
acceptedButtons: Qt.LeftButton
@@ -80,6 +80,7 @@ Item {
}
Text {
+ Layout.leftMargin: 4
id: userName_
text: TimelineManager.escapeEmoji(userName)
@@ -94,8 +95,8 @@ Item {
}
MessageDelegate {
+ Layout.leftMargin: 4
id: reply
-
blurhash: r.blurhash
body: r.body
formattedBody: r.formattedBody
@@ -118,7 +119,7 @@ Item {
encryptionError: r.encryptionError
// This is disabled so that left clicking the reply goes to its location
enabled: false
- width: parent.width
+ Layout.fillWidth: true
isReply: true
}
@@ -128,8 +129,7 @@ Item {
id: backgroundItem
z: -1
- height: replyContainer.height
- width: Math.min(Math.max(reply.implicitWidth, userName_.implicitWidth) + 8 + 4, parent.width)
+ anchors.fill: replyContainer
color: Qt.rgba(userColor.r, userColor.g, userColor.b, 0.1)
}
diff --git a/resources/qml/delegates/TextMessage.qml b/resources/qml/delegates/TextMessage.qml
index eea8cd1e..c9b8a882 100644
--- a/resources/qml/delegates/TextMessage.qml
+++ b/resources/qml/delegates/TextMessage.qml
@@ -33,8 +33,8 @@ MatrixText {
blockquote { margin-left: 1em; }
</style>
" + formatted.replace("<pre>", "<pre style='white-space: pre-wrap; background-color: " + Nheko.colors.alternateBase + "'>").replace("<del>", "<s>").replace("</del>", "</s>").replace("<strike>", "<s>").replace("</strike>", "</s>")
- width: parent.width
- height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : undefined
+// width: parent.width
+ //height: isReply ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : undefined
clip: isReply
selectByMouse: !Settings.mobileMode && !isReply
font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize
|