vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Thu Apr 19 11:25:05 2018 +0200| [089482408148232a8afcec803336f00f352acde4] | committer: Hugo Beauzée-Luyssen
Partial revert "qt: Convert seek slider wheel events to actions" This partially reverts commit 8314cd6ce6774e7086b0ed67567bea2fdeb15895. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=089482408148232a8afcec803336f00f352acde4 --- modules/gui/qt/util/input_slider.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/gui/qt/util/input_slider.cpp b/modules/gui/qt/util/input_slider.cpp index b612354832..75c666ca01 100644 --- a/modules/gui/qt/util/input_slider.cpp +++ b/modules/gui/qt/util/input_slider.cpp @@ -35,8 +35,6 @@ #include "input_manager.hpp" #include "imagehelper.hpp" -#include <vlc_actions.h> - #include <QPaintEvent> #include <QPainter> #include <QBitmap> @@ -403,10 +401,11 @@ void SeekSlider::wheelEvent( QWheelEvent *event ) /* Don't do anything if we are for somehow reason sliding */ if( !isSliding && isEnabled() ) { - if ( event->delta() > 0 ) - var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_JUMP_BACKWARD_SHORT ); - else - var_SetInteger( p_intf->obj.libvlc, "key-action", ACTIONID_JUMP_FORWARD_SHORT ); + setValue( value() + event->delta() / 12 ); /* 12 = 8 * 15 / 10 + Since delta is in 1/8 of ° and mouse have steps of 15 ° + and that our slider is in 0.1% and we want one step to be a 1% + increment of position */ + emit sliderDragged( value() / static_cast<float>( maximum() ) ); } event->accept(); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
