diff options
author | Malte E <malte.e@mailbox.org> | 2022-02-09 21:36:04 +0100 |
---|---|---|
committer | Malte E <malte.e@mailbox.org> | 2022-02-09 21:36:04 +0100 |
commit | 0e548b7d390cfbc3c37689ed9dbff0f1e2eab5cc (patch) | |
tree | 3a50a2ca0d85dd4c63e7a0463821ea5dcfe14578 /resources/qml/delegates/ImageMessage.qml | |
parent | Variable width bubbles (still has binding loop) (diff) | |
download | nheko-0e548b7d390cfbc3c37689ed9dbff0f1e2eab5cc.tar.xz |
fixed most of the binding loops
Diffstat (limited to 'resources/qml/delegates/ImageMessage.qml')
-rw-r--r-- | resources/qml/delegates/ImageMessage.qml | 5 |
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_ |