From c80521946368987567be566cbe6657154ef44f36 Mon Sep 17 00:00:00 2001 From: Patryk Osmaczko Date: Tue, 18 Oct 2022 10:51:47 +0200 Subject: [PATCH] fix(communities/portal): scale banner to fit community card --- .../StatusQ/Components/StatusCommunityCard.qml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusCommunityCard.qml b/ui/StatusQ/src/StatusQ/Components/StatusCommunityCard.qml index 703ce7de1e..d78f0dfc26 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusCommunityCard.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusCommunityCard.qml @@ -178,29 +178,37 @@ Rectangle { // Community banner: Item { id: banner + anchors.top: parent.top - width: d.cardWidth + width: parent.width height: d.bannerHeigth + Rectangle { id: mask + anchors.fill: parent + radius: d.bannerRadius color: root.loaded ? root.communityColor : d.loadingColor2 // hide when image is loaded to avoid glitches on the edge visible: image.status !== Image.Ready } + Image { id: image - source: root.banner + anchors.fill: parent - anchors.centerIn: parent - fillMode: Image.PreserveAspectFit + + source: root.banner + fillMode: Image.PreserveAspectCrop smooth: true visible: false } + OpacityMask { anchors.fill: image + source: image maskSource: mask }