[vlc-commits] qml: improve readability in Player widget

Prince Gupta git at videolan.org
Mon Feb 8 10:00:05 UTC 2021


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Tue Jan 12 17:23:19 2021 +0530| [8a445bcb01f85f8bce52938585e990a4dd210b57] | committer: Pierre Lamot

qml: improve readability in Player widget

use gaussian blur and overlay blending with darker colors in Player background's cover

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

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

 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 {



More information about the vlc-commits mailing list