From d741e79e2e0e5784a0632e31195de1fe3c3a4b34 Mon Sep 17 00:00:00 2001 From: "gaelle.braud" Date: Thu, 6 Nov 2025 17:50:15 +0100 Subject: [PATCH] fix file preview display #LINQT-2098 --- .../view/Control/Display/Chat/FileView.qml | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Linphone/view/Control/Display/Chat/FileView.qml b/Linphone/view/Control/Display/Chat/FileView.qml index 62955853b..fa9b7f399 100644 --- a/Linphone/view/Control/Display/Chat/FileView.qml +++ b/Linphone/view/Control/Display/Chat/FileView.qml @@ -67,20 +67,30 @@ Item { sourceSize.height: mainItem.height fillMode: Image.PreserveAspectFit } - Rectangle { + Image { anchors.fill: parent - color: DefaultStyle.main1_200 - opacity: 0.5 - Image { + z: image.z + 1 + visible: image.status == Image.Error || image.status == Image.Null || !UtilsCpp.fileExists(mainItem.filePath) + source: AppIcons.fileImage + sourceSize.width: mainItem.width + sourceSize.height: mainItem.height + fillMode: Image.PreserveAspectFit + } + Item { + id: loadingImageItem + anchors.fill: parent + visible: mainItem.isImage && image.status === Image.Loading + Rectangle { anchors.fill: parent - z: parent.z + 1 - visible: image.status == Image.Error || image.status == Image.Null || !UtilsCpp.fileExists(mainItem.filePath) - source: AppIcons.fileImage - sourceSize.width: mainItem.width - sourceSize.height: mainItem.height - fillMode: Image.PreserveAspectFit + color: DefaultStyle.main1_200 + opacity: 0.2 + } + BusyIndicator { + anchors.centerIn: parent + width: Utils.getSizeWithScreenRatio(20) } } + Image { id: image visible: mainItem.isImage && status !== Image.Loading @@ -343,4 +353,4 @@ Item { } } } -} \ No newline at end of file +}