[vlc-devel] [PATCH 14/27] qml: fix HorizontalResizeHandle
Fatih Uzunoglu
fuzun54 at outlook.com
Fri Dec 4 00:01:49 CET 2020
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.
---
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))
}
--
2.27.0
More information about the vlc-devel
mailing list