[vlc-commits] qt: input_slider: Convert wheel events to KEY_MOUSEWHEEL*

Hugo Beauzée-Luyssen git at videolan.org
Thu Apr 5 11:11:27 CEST 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Apr  5 10:59:58 2018 +0200| [11bd3483a06de831a9127fd813db5728a178632a] | committer: Hugo Beauzée-Luyssen

qt: input_slider: Convert wheel events to KEY_MOUSEWHEEL*

This way we can honor the user's settings regarding inverting the scroll
direction, and they can chose the size of the jump

refs #19790

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

 modules/gui/qt/util/input_slider.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/util/input_slider.cpp b/modules/gui/qt/util/input_slider.cpp
index b612354832..d5dcff61ea 100644
--- a/modules/gui/qt/util/input_slider.cpp
+++ b/modules/gui/qt/util/input_slider.cpp
@@ -404,9 +404,9 @@ void SeekSlider::wheelEvent( QWheelEvent *event )
     if( !isSliding && isEnabled() )
     {
         if ( event->delta() > 0 )
-            var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_JUMP_BACKWARD_SHORT );
+            var_SetInteger( p_intf->obj.libvlc, "key-pressed", KEY_MOUSEWHEELRIGHT );
         else
-            var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_JUMP_FORWARD_SHORT );
+            var_SetInteger( p_intf->obj.libvlc, "key-pressed", KEY_MOUSEWHEELLEFT );
     }
     event->accept();
 }



More information about the vlc-commits mailing list