Handle images with incorrect (0, 0) size better

BUG: 460205
BUG: 460150
This commit is contained in:
Tobias Fella
2022-10-10 20:04:40 +02:00
parent eba6c1faaa
commit de0b138992

View File

@@ -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 {