[vlc-commits] qml: fix HorizontalResizeHandle

Fatih Uzunoglu git at videolan.org
Mon Dec 7 10:08:31 UTC 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec  4 02:01:49 2020 +0300| [036cc94fa6941c583fcce015d9c1d02abd29fed5] | committer: Pierre Lamot

qml: fix HorizontalResizeHandle

This patch fixes the 'jumping widget' problem which happens when dragging starts. To reproduce the problem, set its width to something large and see how it behaves.

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

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

 modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml b/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
index 7fa16f9b89..ab0bd0d386 100644
--- a/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
+++ b/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
@@ -45,7 +45,8 @@ MouseArea {
 
     onPositionChanged: {
         var f = atRight ? -1 : 1
-        var delta = mouseX + _previousX * f
+        var delta = mouseX - _previousX
+
         root.widthFactor = root.sourceWidth / (root.targetWidth + (delta * - f))
     }
 



More information about the vlc-commits mailing list