[vlc-devel] [PATCH 14/33] qml: improve readability in Player widget

Prince Gupta guptaprince8832 at gmail.com
Wed Feb 3 10:56:30 UTC 2021


use gaussian blur and overlay blending with darker colors in Player background's cover
---
 modules/gui/qt/player/qml/Player.qml | 48 +++++++++++++++++++++++++---
 1 file changed, 43 insertions(+), 5 deletions(-)

diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index be4cde2d53..e370f36047 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -534,22 +534,60 @@ Widgets.NavigableFocusScope {
 
         z: 0
 
-        FastBlur {
+        Item {
             //destination aspect ration
             readonly property real dar: parent.width / parent.height
 
             anchors.centerIn: parent
             width: (cover.sar < dar) ? parent.width :  parent.height * cover.sar
             height: (cover.sar < dar) ? parent.width / cover.sar :  parent.height
-            source: cover
-            radius: 64
 
-            //darken background
+            GaussianBlur {
+                id: blur
+
+                anchors.fill: parent
+                source: cover
+                samples: 102
+                radius: 50
+                visible: false
+            }
+
+            Rectangle {
+                id: blurOverlay
+
+                color: rootPlayer.colors.setColorAlpha(rootPlayer.colors.playerBg, .55)
+                anchors.fill: parent
+                visible: false
+            }
+
+            Blend {
+                id:screen
+
+                anchors.fill: parent
+                foregroundSource: blurOverlay
+                source: blur
+                mode: "screen"
+                visible: false
+            }
+
+            Blend {
+                anchors.fill: parent
+                source: screen
+                foregroundSource: blurOverlay
+                mode: "multiply"
+            }
+
             Rectangle {
-                color: "#80000000"
+                id: colorOverlay
+
                 anchors.fill: parent
+                visible: true
+                opacity: .4
+                color: rootPlayer.colors.setColorAlpha(Qt.tint(rootPlayer.colors.playerFg, rootPlayer.colors.playerBg), 1)
             }
+
         }
+
     }
 
     VideoSurface {
-- 
2.25.1



More information about the vlc-devel mailing list