[vlc-commits] qml: fix bugged playlist drag item position update
Fatih Uzunoglu
git at videolan.org
Mon Aug 10 12:09:58 CEST 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Thu Jul 30 00:04:26 2020 +0300| [4a586c600c6f708f8f2d38a9de43bd34c4825d8d] | committer: Pierre Lamot
qml: fix bugged playlist drag item position update
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a586c600c6f708f8f2d38a9de43bd34c4825d8d
---
modules/gui/qt/playlist/qml/PLItem.qml | 9 +++++++--
modules/gui/qt/widgets/qml/DNDLabel.qml | 4 ++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt/playlist/qml/PLItem.qml b/modules/gui/qt/playlist/qml/PLItem.qml
index 56974e05be..cd673b112e 100644
--- a/modules/gui/qt/playlist/qml/PLItem.qml
+++ b/modules/gui/qt/playlist/qml/PLItem.qml
@@ -111,9 +111,14 @@ Rectangle {
}
else
__rightButton = false
+ }
- var pos = this.mapToGlobal( mouseX, mouseY)
- dragItem.updatePos(pos.x, pos.y)
+ onPositionChanged: {
+ if (dragItem.visible)
+ {
+ var pos = this.mapToGlobal( mouseX, mouseY)
+ dragItem.updatePos(pos.x + VLCStyle.dp(15), pos.y)
+ }
}
Rectangle {
diff --git a/modules/gui/qt/widgets/qml/DNDLabel.qml b/modules/gui/qt/widgets/qml/DNDLabel.qml
index 83176537d2..f7ce5af11f 100644
--- a/modules/gui/qt/widgets/qml/DNDLabel.qml
+++ b/modules/gui/qt/widgets/qml/DNDLabel.qml
@@ -39,8 +39,8 @@ Rectangle {
function updatePos(x, y) {
var pos = root.mapFromGlobal(x, y)
- dragItem.x = pos.x + 10
- dragItem.y = pos.y + 10
+ dragItem.x = pos.x
+ dragItem.y = pos.y
}
Text {
More information about the vlc-commits
mailing list