From bc4cde2dc7d714c6c175231134cef165e3cde82b Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 3 Dec 2020 13:42:21 +0100 Subject: [PATCH] Improve image delegate sizing --- imports/NeoChat/Component/Timeline/ImageDelegate.qml | 2 +- imports/NeoChat/Page/RoomPage.qml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imports/NeoChat/Component/Timeline/ImageDelegate.qml b/imports/NeoChat/Component/Timeline/ImageDelegate.qml index 710c7d132..c903bd3b3 100644 --- a/imports/NeoChat/Component/Timeline/ImageDelegate.qml +++ b/imports/NeoChat/Component/Timeline/ImageDelegate.qml @@ -35,7 +35,7 @@ Image { sourceSize.width: info.w sourceSize.height: info.h - fillMode: Image.PreserveAspectCrop + fillMode: Image.PreserveAspectFit Control { anchors.bottom: parent.bottom diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index 64abdeb9b..f7ee3cb65 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -338,6 +338,7 @@ Kirigami.ScrollablePage { ImageDelegate { Layout.maximumWidth: parent.width Layout.minimumWidth: 320 + Layout.preferredHeight: info.h / info.w * width }, ReactionDelegate { Layout.fillWidth: true