[vlc-commits] qml: allow to explicitly disable video surface in the player

Pierre Lamot git at videolan.org
Thu Aug 20 10:20:56 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Jun  4 18:21:49 2020 +0200| [cb66e4f3244012004307b19dac2c8204ab87ff03] | committer: Pierre Lamot

qml: allow to explicitly disable video surface in the player

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

 modules/gui/qt/player/qml/Player.qml | 13 ++++++++-----
 modules/gui/qt/player/qml/TopBar.qml |  2 +-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index 2a112d356c..062ae64820 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -34,6 +34,8 @@ Widgets.NavigableFocusScope {
     //menu/overlay to dismiss
     property var _menu: undefined
 
+    property bool hasEmbededVideo: mainInterface.hasEmbededVideo
+
     function dismiss() {
         if (_menu)
             _menu.dismiss()
@@ -61,7 +63,7 @@ Widgets.NavigableFocusScope {
     }
 
     navigationCancel: function() {
-        if (mainInterface.hasEmbededVideo && controlBarView.state === "visible") {
+        if (rootPlayer.hasEmbededVideo && controlBarView.state === "visible") {
             toolbarAutoHide._setVisibleControlBar(false)
         } else {
             if (player.hasVideoOutput) {
@@ -151,7 +153,7 @@ Widgets.NavigableFocusScope {
                 spacing: VLCStyle.margin_small
 
 
-                visible: !mainInterface.hasEmbededVideo
+                visible: !rootPlayer.hasEmbededVideo
 
                 Item {
                     Layout.fillHeight: true
@@ -311,7 +313,7 @@ Widgets.NavigableFocusScope {
 
                         lockAutoHide: playlistpopup.state === "visible"
                             || !player.hasVideoOutput
-                            || !mainInterface.hasEmbededVideo
+                            || !rootPlayer.hasEmbededVideo
                             || controllerMouseArea.containsMouse
                         onAutoHideChanged: {
                             if (autoHide)
@@ -329,7 +331,7 @@ Widgets.NavigableFocusScope {
 
     //center image
     Rectangle {
-        visible: !mainInterface.hasEmbededVideo
+        visible: !rootPlayer.hasEmbededVideo
         focus: false
         color: VLCStyle.colors.bg
         anchors.fill: parent
@@ -360,7 +362,8 @@ Widgets.NavigableFocusScope {
         z: 0
 
         ctx: mainctx
-        visible: mainInterface.hasEmbededVideo
+        visible: rootPlayer.hasEmbededVideo
+        enabled: rootPlayer.hasEmbededVideo
         anchors.fill: parent
 
         property point mousePosition: Qt.point(0,0)
diff --git a/modules/gui/qt/player/qml/TopBar.qml b/modules/gui/qt/player/qml/TopBar.qml
index 37df6dcc6a..b5b5b121cc 100644
--- a/modules/gui/qt/player/qml/TopBar.qml
+++ b/modules/gui/qt/player/qml/TopBar.qml
@@ -31,7 +31,7 @@ Widgets.NavigableFocusScope{
     implicitHeight: topcontrolContent.implicitHeight
 
     property bool autoHide: player.hasVideoOutput
-                            && mainInterface.hasEmbededVideo
+                            && rootPlayer.hasEmbededVideo
                             && !topcontrollerMouseArea.containsMouse
                             && !lockAutoHide
 



More information about the vlc-commits mailing list