Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information