[vlc-devel] [PATCH 07/25] qml: remove redundant container element

Prince Gupta guptaprince8832 at gmail.com
Thu Mar 11 09:16:15 UTC 2021


---
 modules/gui/qt/player/qml/Player.qml | 50 +++++++++++++---------------
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index d989fbd682..7f9e8dadbe 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -428,39 +428,35 @@ Widgets.NavigableFocusScope {
         state: "visible"
         edge: Widgets.DrawerExt.Edges.Bottom
 
-        component: Item {
-            id: controllerBarId
+        component: MouseArea {
+            id: controllerMouseArea
 
-            width: controlBarView.width
-            height: controllerId.implicitHeight + controllerId.anchors.bottomMargin
             property alias autoHide: controllerId.autoHide
 
-            MouseArea {
-                id: controllerMouseArea
-                hoverEnabled: true
-                anchors.fill: parent
+            height: controllerId.implicitHeight + controllerId.anchors.bottomMargin
+            width: controlBarView.width
+            hoverEnabled: true
 
-                ControlBar {
-                    id: controllerId
-                    focus: true
-                    anchors.fill: parent
-                    anchors.leftMargin: VLCStyle.applicationHorizontalMargin
-                    anchors.rightMargin: VLCStyle.applicationHorizontalMargin
-                    anchors.bottomMargin: VLCStyle.applicationVerticalMargin
-                    colors: rootPlayer.colors
-
-                    lockAutoHide: playlistpopup.state === "visible"
-                        || !player.hasVideoOutput
-                        || !rootPlayer.hasEmbededVideo
-                        || controllerMouseArea.containsMouse
-                    onAutoHideChanged: {
-                        if (autoHide)
-                            toolbarAutoHide.restart()
-                    }
+            ControlBar {
+                id: controllerId
+                focus: true
+                anchors.fill: parent
+                anchors.leftMargin: VLCStyle.applicationHorizontalMargin
+                anchors.rightMargin: VLCStyle.applicationHorizontalMargin
+                anchors.bottomMargin: VLCStyle.applicationVerticalMargin
+                colors: rootPlayer.colors
 
-                    navigationParent: rootPlayer
-                    navigationUpItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
+                lockAutoHide: playlistpopup.state === "visible"
+                    || !player.hasVideoOutput
+                    || !rootPlayer.hasEmbededVideo
+                    || controllerMouseArea.containsMouse
+                onAutoHideChanged: {
+                    if (autoHide)
+                        toolbarAutoHide.restart()
                 }
+
+                navigationParent: rootPlayer
+                navigationUpItem: playlistpopup.showPlaylist ? playlistpopup : (audioControls.visible ? audioControls : topcontrolView)
             }
         }
     }
-- 
2.25.1



More information about the vlc-devel mailing list