Variable width bubbles (still has binding loop)
3 files changed, 4 insertions, 1 deletions
diff --git a/resources/qml/delegates/Encrypted.qml b/resources/qml/delegates/Encrypted.qml
index 6840c955..d82f027b 100644
--- a/resources/qml/delegates/Encrypted.qml
+++ b/resources/qml/delegates/Encrypted.qml
@@ -17,6 +17,7 @@ Rectangle {
radius: fontMetrics.lineSpacing / 2 + Nheko.paddingMedium
width: parent.width
+ implicitWidth: encryptedText.implicitWidth+24+Nheko.paddingMedium*3 // Column doesn't provide a useful implicitWidth, should be replaced by ColumnLayout
height: contents.implicitHeight + Nheko.paddingMedium * 2
color: Nheko.colors.alternateBase
@@ -39,6 +40,7 @@ Rectangle {
Layout.fillWidth: true
MatrixText {
+ id: encryptedText
text: {
switch (encryptionError) {
case Olm.MissingSession:
diff --git a/resources/qml/delegates/MessageDelegate.qml b/resources/qml/delegates/MessageDelegate.qml
index 58f12c91..0cec51bc 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
+ implicitWidth: (chooser.child && chooser.child.implicitWidth) ? chooser.child.implicitWidth : width
required property double proportionalHeight
required property int type
required property string typeString
diff --git a/resources/qml/delegates/Reply.qml b/resources/qml/delegates/Reply.qml
index 96fa410e..7c8bccce 100644
--- a/resources/qml/delegates/Reply.qml
+++ b/resources/qml/delegates/Reply.qml
@@ -38,6 +38,7 @@ Item {
Layout.preferredHeight: replyContainer.height
height: replyContainer.height
+ implicitWidth: visible? colorLine.width+replyContainer.implicitWidth : 0
CursorShape {
anchors.fill: parent
|