You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow to change the volume using a mouse hires wheel
The Volume control plugin allows to change the volume using
the mouse wheel. However for hires wheel this doesn't work.
The volume change is controlled by the following formula:
m_volumeSlider->setSliderPosition(m_volumeSlider->sliderPosition()
+ (event->angleDelta().y() / QWheelEvent::DefaultDeltasPerStep *
m_volumeSlider->singleStep()));
For some kind of mouse where the wheel event is compose by a lot
of small 'delta'; the ratio
event->angleDelta().y() / QWheelEvent::DefaultDeltasPerStep
is less than 1; and because this ratio is between two integers
it is rounded to 0.
So store the fraction part of the wheel stroke in a static variable.
0 commit comments