mediawidget: fix video position movement with mouse wheel

Authored by mauroc on May 4 2019, 7:24 PM.

Description

mediawidget: fix video position movement with mouse wheel

The mouse wheel is context sensitive: when it is above a slide
bar, it allows controlling it.

However, setting it while on the top of the video position bar
does not make much effect. The problem here is actually related
to the wheel step. On my mouse, the step is 120, but this value
may vary from mouse to mouse, as it depends on how many positions
are there to do a 360 degrees movement.

The video position is measured in QTime, whose range is miliseconds.
So, one mouse rotation would barely move the video position.

So, we need to scale the mouse event for it to be useful, and.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

Details

Committed
maurocMay 4 2019, 7:32 PM
Parents
R466:b4e3d1c20445: mediawidget:fix the mouse wheel behavior at the streaming window
Branches
Unknown
Tags
Unknown