vlc | branch: master | Fatih Uzunoglu <[email protected]> | Fri Jan  8 
00:36:41 2021 +0300| [932eb5a5b7491c59e87ff957e63a22aa8496deb7] | committer: 
Pierre Lamot

qml: fix drag positional list fade out in PlaylistListView

Signed-off-by: Pierre Lamot <[email protected]>

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

 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

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

Reply via email to