[vlc-devel] [PATCH 14/18] qml: add shadow to top Banner

Prince Gupta guptaprince8832 at gmail.com
Thu Aug 20 14:15:37 CEST 2020


---
 .../qt/maininterface/qml/BannerSources.qml    | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/modules/gui/qt/maininterface/qml/BannerSources.qml b/modules/gui/qt/maininterface/qml/BannerSources.qml
index 112823df51..9ef9f01984 100644
--- a/modules/gui/qt/maininterface/qml/BannerSources.qml
+++ b/modules/gui/qt/maininterface/qml/BannerSources.qml
@@ -19,6 +19,7 @@
 import QtQuick 2.11
 import QtQuick.Controls 2.4
 import QtQuick.Layouts 1.3
+import QtGraphicalEffects 1.0
 import org.videolan.vlc 0.1
 import QtQml.Models 2.11
 
@@ -57,6 +58,32 @@ Widgets.NavigableFocusScope {
             searchBox.expanded = true
     }
 
+    DropShadow {
+        id: primaryShadow
+
+        anchors.fill: pLBannerSources
+        source: pLBannerSources
+        horizontalOffset: 0
+        verticalOffset: VLCStyle.dp(1, VLCStyle.scale)
+        radius: VLCStyle.dp(9, VLCStyle.scale)
+        spread: 0
+        samples: ( radius * 2 ) + 1
+        color: Qt.rgba(0, 0, 0, .22)
+    }
+
+    DropShadow {
+        id: secondaryShadow
+
+        anchors.fill: pLBannerSources
+        source: pLBannerSources
+        horizontalOffset: 0
+        verticalOffset: VLCStyle.dp(0, VLCStyle.scale)
+        radius: VLCStyle.dp(2, VLCStyle.scale)
+        spread: 0
+        samples: ( radius * 2 ) + 1
+        color: Qt.rgba(0, 0, 0, .18)
+    }
+
     Rectangle {
         id: pLBannerSources
 
-- 
2.25.1



More information about the vlc-devel mailing list