[vlc-commits] qml: don't instanciate floating playlist window when unnecessary
Pierre Lamot
git at videolan.org
Tue Jul 16 10:13:36 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | 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 <jb at videolan.org>
> 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
+ }
}
}
More information about the vlc-commits
mailing list