[vlc-commits] [Git][videolan/vlc][master] qml: correct detached playlist window positioning

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Oct 4 16:23:29 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
b25d23b7 by Fatih Uzunoglu at 2021-10-04T15:59:42+00:00
qml: correct detached playlist window positioning

mainInterface.minimumHeight is no longer available,
therefore use topWindow to retrieve minimum height.

- - - - -


1 changed file:

- modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml


Changes:

=====================================
modules/gui/qt/playlist/qml/PlaylistDetachedWindow.qml
=====================================
@@ -17,30 +17,35 @@
  *****************************************************************************/
 
 import QtQuick 2.11
-import org.videolan.vlc 0.1
 import QtQuick.Window 2.11
 
+import org.videolan.vlc 0.1
+
 import "qrc:///style/"
 
 
 Window {
     visible: true
 
-    property var rootWindow: g_root
-    readonly property point rootLocation: rootWindow.mapToGlobal(rootWindow.x, rootWindow.y)
+    property var window: topWindow
 
-    width: 300
+    width: 350
     minimumWidth: playlistView.minimumWidth
-    // minimumHeight: mainInterface.minimumHeight
+
     title: i18n.qtr("Playlist")
     color: VLCStyle.colors.bg
 
     Component.onCompleted: {
-        minimumHeight = mainInterface.minimumHeight // suppress non-notifyable property binding
-
-        x = rootLocation.x + rootWindow.width + VLCStyle.dp(10, VLCStyle.scale)
-        y = rootLocation.y
-        height = rootWindow.height
+        if (!!window) {
+            height = window.height
+            minimumHeight = window.minimumHeight
+
+            x = window.x + window.width + 10
+            y = window.y
+        } else {
+            height = 400
+            minimumHeight = 200
+        }
     }
 
     PlaylistListView {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b25d23b7a9d191fc12ba6ac379bf534c6a150cff

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/b25d23b7a9d191fc12ba6ac379bf534c6a150cff
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list