[vlc-commits] qml: PointingTooltip should not have illegal position

Fatih Uzunoglu git at videolan.org
Mon Nov 16 10:04:19 CET 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Wed Aug 19 19:25:48 2020 +0300| [550ed99b94d4383d4bc57b3604e05c771086df41] | committer: Pierre Lamot

qml: PointingTooltip should not have illegal position

this fixes an issue when dragging occurs

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

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

 modules/gui/qt/widgets/qml/PointingTooltip.qml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/widgets/qml/PointingTooltip.qml b/modules/gui/qt/widgets/qml/PointingTooltip.qml
index 6ddc99fc92..b6cd0fbd9e 100644
--- a/modules/gui/qt/widgets/qml/PointingTooltip.qml
+++ b/modules/gui/qt/widgets/qml/PointingTooltip.qml
@@ -36,8 +36,8 @@ Item {
     property bool fixedY: true
 
     readonly property real position: xPos / mouseArea.width
-    property real xPos: mouseArea.mouseX
-    property real yPos: mouseArea.mouseY
+    property real xPos: Math.max(Math.min(mouseArea.mouseX, mouseArea.width), 0.0)
+    property real yPos: Math.max(Math.min(mouseArea.mouseY, mouseArea.height), 0.0)
 
     width: childrenRect.width
     height: childrenRect.height



More information about the vlc-commits mailing list