[vlc-commits] qml: change cursor when dragging DragItem

Fatih Uzunoglu git at videolan.org
Tue Jan 12 13:21:02 UTC 2021


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Jan  8 00:37:04 2021 +0300| [ed12c57e42f6a6fdcd6b58f6bc04fce59701fc17] | committer: Pierre Lamot

qml: change cursor when dragging DragItem

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

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

 modules/gui/qt/widgets/qml/DragItem.qml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/DragItem.qml b/modules/gui/qt/widgets/qml/DragItem.qml
index 807de1ea58..723ed2ec28 100644
--- a/modules/gui/qt/widgets/qml/DragItem.qml
+++ b/modules/gui/qt/widgets/qml/DragItem.qml
@@ -42,9 +42,12 @@ Playlist.PlaylistDroppable {
     }
 
     Drag.onActiveChanged: {
-        if (!Drag.active)
-            return
-        _model = updateComponents(_maxCovers)
+        if (Drag.active) {
+            _model = updateComponents(_maxCovers)
+            mainInterface.setCursor(Qt.DragMoveCursor)
+        } else {
+            mainInterface.restoreCursor()
+        }
     }
 
     function coversXPos(index) {



More information about the vlc-commits mailing list