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-09 21:36:04 +0100
committerMalte E <malte.e@mailbox.org>2022-02-09 21:36:04 +0100
commit0e548b7d390cfbc3c37689ed9dbff0f1e2eab5cc (patch)
tree3a50a2ca0d85dd4c63e7a0463821ea5dcfe14578 /resources/qml/delegates/ImageMessage.qml
parentVariable width bubbles (still has binding loop) (diff)
downloadnheko-0e548b7d390cfbc3c37689ed9dbff0f1e2eab5cc.tar.xz
fixed most of the binding loops
Diffstat (limited to 'resources/qml/delegates/ImageMessage.qml')
-rw-r--r--resources/qml/delegates/ImageMessage.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/qml/delegates/ImageMessage.qml b/resources/qml/delegates/ImageMessage.qml

index da15bdfe..3bbcd077 100644 --- a/resources/qml/delegates/ImageMessage.qml +++ b/resources/qml/delegates/ImageMessage.qml
@@ -17,13 +17,16 @@ Item { required property string filename required property bool isReply required property string eventId - property double tempWidth: Math.min(parent.width, originalWidth < 1 ? 200 : originalWidth) + 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 Image { id: blurhash_