From de0b138992d06a20a55ed4d24c56f60d655c7227 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 10 Oct 2022 20:04:40 +0200 Subject: [PATCH] Handle images with incorrect (0, 0) size better BUG: 460205 BUG: 460150 --- imports/NeoChat/Component/Timeline/ImageDelegate.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imports/NeoChat/Component/Timeline/ImageDelegate.qml b/imports/NeoChat/Component/Timeline/ImageDelegate.qml index f77e9a8f5..26b38b996 100644 --- a/imports/NeoChat/Component/Timeline/ImageDelegate.qml +++ b/imports/NeoChat/Component/Timeline/ImageDelegate.qml @@ -37,9 +37,9 @@ TimelineContainer { id: img Layout.maximumWidth: imageDelegate.contentMaxWidth - Layout.maximumHeight: imageDelegate.contentMaxWidth / imageDelegate.info.w * imageDelegate.info.h - Layout.preferredWidth: imageDelegate.info.w - Layout.preferredHeight: imageDelegate.info.h + Layout.maximumHeight: imageDelegate.contentMaxWidth / sourceSize.width * sourceSize.height + Layout.preferredWidth: imageDelegate.info.w > 0 ? imageDelegate.info.w : sourceSize.width + Layout.preferredHeight: imageDelegate.info.h > 0 ? imageDelegate.info.h : sourceSize.height source: model.mediaUrl Image {