[vlc-commits] qml: fix HorizontalResizeHandle cursor management
Fatih Uzunoglu
git at videolan.org
Mon Dec 7 10:08:36 UTC 2020
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec 4 02:01:53 2020 +0300| [00e629e820cdb8815b5642d4baeecbc3ac93e55e] | committer: Pierre Lamot
qml: fix HorizontalResizeHandle cursor management
CursorShape of MouseArea which is used in HorizontalResizeHandle is only valid when the mouse location stays inside MouseArea's boundingRect. However, we would like to see the cursor intact even when mouse goes outside during resizing.
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00e629e820cdb8815b5642d4baeecbc3ac93e55e
---
modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml b/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
index ab0bd0d386..dc7216cdd7 100644
--- a/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
+++ b/modules/gui/qt/widgets/qml/HorizontalResizeHandle.qml
@@ -41,7 +41,14 @@ MouseArea {
width: VLCStyle.dp(8, VLCStyle.scale)
acceptedButtons: Qt.LeftButton
- onPressed: _previousX = mouseX
+ onPressed: {
+ mainInterface.setCursor(cursorShape)
+ _previousX = mouseX
+ }
+
+ onReleased: {
+ mainInterface.restoreCursor()
+ }
onPositionChanged: {
var f = atRight ? -1 : 1
More information about the vlc-commits
mailing list