summary refs log tree commit diff
path: root/resources/qml/delegates/ImageMessage.qml
diff options
context:
space:
mode:
authorMalte E <malte.e@mailbox.org>2022-02-11 22:02:30 +0100
committerMalte E <malte.e@mailbox.org>2022-02-11 22:02:30 +0100
commitd0ac110cb7013124c511bbe3ea2dc05db9e695b2 (patch)
tree81d12ddf7159dac63d731153e1ce999301d98b28 /resources/qml/delegates/ImageMessage.qml
parentfixed most of the binding loops (diff)
downloadnheko-d0ac110cb7013124c511bbe3ea2dc05db9e695b2.tar.xz
Fix layout - no more binding loops (hopefully)
Diffstat (limited to 'resources/qml/delegates/ImageMessage.qml')
-rw-r--r--resources/qml/delegates/ImageMessage.qml11
1 files changed, 3 insertions, 8 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml

index 3bbcd077..a13bb4f6 100644 --- a/resources/qml/delegates/ImageMessage.qml +++ b/resources/qml/delegates/ImageMessage.qml
@@ -17,16 +17,11 @@ Item { required property string filename required property bool isReply required property string eventId - property int maxWidth - property double tempWidth: Math.min(maxWidth, originalWidth < 1 ? 200 : originalWidth) - property double tempHeight: tempWidth * proportionalHeight property double divisor: isReply ? 5 : 3 - property bool tooHigh: tempHeight > timelineView.height / divisor - height: Math.round(tooHigh ? timelineView.height / divisor : tempHeight) - width: Math.round(tooHigh ? (timelineView.height / divisor) / proportionalHeight : tempWidth) - implicitHeight: height - implicitWidth: width + implicitWidth: Math.round(originalWidth*Math.min((timelineView.height/divisor)/(originalWidth*proportionalHeight), 1)) + width: parent.width + height: width*proportionalHeight Image { id: blurhash_