[vlc-commits] qml: don't set layer.effects directly in RoundImage

Prince Gupta git at videolan.org
Thu Dec 17 14:57:21 UTC 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Mon Dec  7 23:06:21 2020 +0530| [ad0ad3b3fcc974cdd24dc0f92d9d44522ae9ab6d] | committer: Pierre Lamot

qml: don't set layer.effects directly in RoundImage

fixes DropShadow not correctly working on this widget

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad0ad3b3fcc974cdd24dc0f92d9d44522ae9ab6d
---

 modules/gui/qt/widgets/qml/RoundImage.qml | 41 ++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 12 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/RoundImage.qml b/modules/gui/qt/widgets/qml/RoundImage.qml
index b54102db98..4d9567cfc3 100644
--- a/modules/gui/qt/widgets/qml/RoundImage.qml
+++ b/modules/gui/qt/widgets/qml/RoundImage.qml
@@ -21,19 +21,36 @@ import QtGraphicalEffects 1.0
 
 import "qrc:///style/"
 
-Image {
-    id: cover
-    asynchronous: true
+Item {
+    id: root
+
     property real radius: 3
-    fillMode: Image.PreserveAspectCrop
-    sourceSize: Qt.size(width, height)
-    layer.enabled: true
-    layer.effect: OpacityMask {
-        maskSource: Rectangle {
-            radius: cover.radius
-            width: cover.width
-            height: cover.height
-            visible: false
+    property alias asynchronous: cover.asynchronous
+    property alias fillMode: cover.fillMode
+    property alias mipmap: cover.mipmap
+    property alias paintedHeight: cover.paintedHeight
+    property alias paintedWidth: cover.paintedWidth
+    property alias source: cover.source
+    property alias sourceSize: cover.sourceSize
+    property alias status: cover.status
+    property alias horizontalAlignment: cover.horizontalAlignment
+    property alias verticalAlignment: cover.verticalAlignment
+
+    Image {
+        id: cover
+
+        anchors.fill: parent
+        asynchronous: true
+        fillMode: Image.PreserveAspectCrop
+        sourceSize: Qt.size(width, height)
+        layer.enabled: true
+        layer.effect: OpacityMask {
+            maskSource: Rectangle {
+                radius: root.radius
+                width: root.width
+                height: root.height
+                visible: false
+            }
         }
     }
 }



More information about the vlc-commits mailing list