vlc | branch: master | Pierre Lamot <[email protected]> | Wed Jul 10 11:02:45 
2019 +0200| [83817e6fa4c8756957f0b04570dc94fdf7ac5dbc] | committer: 
Jean-Baptiste Kempf

qml: don't instanciate floating playlist window when unnecessary

Windows are still instanciated with their content when visible is false

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 modules/gui/qt/qml/MainInterface.qml | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/modules/gui/qt/qml/MainInterface.qml 
b/modules/gui/qt/qml/MainInterface.qml
index e898d9a5d3..ac828cff63 100644
--- a/modules/gui/qt/qml/MainInterface.qml
+++ b/modules/gui/qt/qml/MainInterface.qml
@@ -34,16 +34,19 @@ Rectangle {
     id: root
     color: "transparent"
 
-    Window {
-        id: playlistWindow
-        visible: !rootWindow.playlistDocked && rootWindow.playlistVisible
-        title: qsTr("Playlist")
-        color: VLCStyle.colors.bg
-        onClosing: rootWindow.playlistVisible = false
-        PL.PlaylistListView {
-            id: playlistView
-            focus: true
-            anchors.fill: parent
+    Loader {
+        id: playlistWindowLoader
+        active: !rootWindow.playlistDocked && rootWindow.playlistVisible
+        sourceComponent: Window {
+            visible: true
+            title: qsTr("Playlist")
+            color: VLCStyle.colors.bg
+            onClosing: rootWindow.playlistVisible = false
+            PL.PlaylistListView {
+                id: playlistView
+                focus: true
+                anchors.fill: parent
+            }
         }
     }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to