[vlc-devel] [PATCH 28/55] qml: fix drag positional list fade out in PlaylistListView

Fatih Uzunoglu fuzun54 at outlook.com
Thu Jan 7 21:36:41 UTC 2021


---
 modules/gui/qt/playlist/qml/PlaylistListView.qml | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/playlist/qml/PlaylistListView.qml b/modules/gui/qt/playlist/qml/PlaylistListView.qml
index 4e1e620ebe..a16af0f965 100644
--- a/modules/gui/qt/playlist/qml/PlaylistListView.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistListView.qml
@@ -101,11 +101,11 @@ Widgets.NavigableFocusScope {
             }
 
             on_PosChanged: {
-                var dragItemY = root.mapToGlobal(dragItem._pos.x, dragItem._pos.y).y
-                var viewY     = root.mapToGlobal(listView.x, listView.y).y
+                var dragItemY = dragItem._pos.y
+                var viewY     = root.mapFromItem(listView, listView.x, listView.y).y
 
                 var topDiff    = (viewY + VLCStyle.dp(20, VLCStyle.scale)) - dragItemY
-                var bottomDiff = dragItemY - (viewY + listView.height - VLCStyle.dp(20, VLCStyle.scale))
+                var bottomDiff = dragItemY - (viewY + listView.height - toolbar.height - VLCStyle.dp(20, VLCStyle.scale))
 
                 if(!listView.listView.atYBeginning && topDiff > 0) {
                     _scrollingDirection = -1
@@ -624,6 +624,8 @@ Widgets.NavigableFocusScope {
             }
 
             PlaylistToolbar {
+                id: toolbar
+
                 Layout.fillWidth: true
 
                 Layout.leftMargin: root.leftPadding
-- 
2.27.0



More information about the vlc-devel mailing list