[vlc-commits] [Git][videolan/vlc][master] 2 commits: qml: check if cursor is inside the circle in press and hold handler in PlayButton
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Jul 20 14:22:41 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
862ad05c by Fatih Uzunoglu at 2024-07-20T13:53:06+00:00
qml: check if cursor is inside the circle in press and hold handler in PlayButton
- - - - -
e349f5d1 by Fatih Uzunoglu at 2024-07-20T13:53:06+00:00
qml: reset the rectangle state in PlayButton when the cursor goes outside
... so that the stop animation can stop, since the player will no
longer be stopped.
- - - - -
1 changed file:
- modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
Changes:
=====================================
modules/gui/qt/player/qml/controlbarcontrols/PlayButton.qml
=====================================
@@ -157,6 +157,15 @@ T.Control {
}
}
+ onCursorInsideChanged: {
+ if (pressed && !cursorInside) {
+ // Press and hold action can no longer be done,
+ // so reset the state in order to reset the
+ // animation:
+ innerRectangle.state = ""
+ }
+ }
+
onPressed: (mouse) => {
if (!cursorInside) {
mouse.accepted = false
@@ -177,6 +186,11 @@ T.Control {
}
onPressAndHold: (mouse) => {
+ if (!cursorInside) {
+ mouse.accepted = false
+ return
+ }
+
_pressAndHoldAction()
mouse.accepted = true
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ed721fee55c0184c7e730faf308fc90d8b7df705...e349f5d1f14736e35f53bc76dcbe5a808d7e9c97
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ed721fee55c0184c7e730faf308fc90d8b7df705...e349f5d1f14736e35f53bc76dcbe5a808d7e9c97
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list