From cd0eace63197c1205de24ec39ea68c6bd60db0a1 Mon Sep 17 00:00:00 2001 From: Slava Monich Date: Wed, 30 Dec 2020 17:45:29 +0200 Subject: [PATCH] Fixed invalid component reference in StickerPreview --- qml/components/StickerPreview.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qml/components/StickerPreview.qml b/qml/components/StickerPreview.qml index a2a2977..299780a 100644 --- a/qml/components/StickerPreview.qml +++ b/qml/components/StickerPreview.qml @@ -35,9 +35,6 @@ Item { implicitWidth: stickerData.width implicitHeight: stickerData.height - layer.enabled: highlighted - layer.effect: PressEffect { source: singleImage } - TDLibFile { id: file tdlib: tdLibWrapper @@ -59,11 +56,14 @@ Item { active: animated sourceComponent: Component { AnimatedImage { + id: animatedSticker anchors.fill: parent source: file.path asynchronous: true paused: !Qt.application.active cache: false + layer.enabled: highlighted + layer.effect: PressEffect { source: animatedSticker } } } } @@ -74,6 +74,7 @@ Item { active: !animated sourceComponent: Component { Image { + id: staticSticker anchors.fill: parent source: file.path fillMode: Image.PreserveAspectFit @@ -82,6 +83,8 @@ Item { visible: opacity > 0 opacity: status === Image.Ready ? 1 : 0 Behavior on opacity { FadeAnimation {} } + layer.enabled: highlighted + layer.effect: PressEffect { source: staticSticker } } } }