1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-23 08:20:01 +01:00

Reverse volume slider direction with horizontal scroll.

Fixes #5064
This commit is contained in:
John Maguire 2015-10-08 13:31:29 +01:00
parent 8f84a53273
commit 3aac164f1e

View File

@ -49,9 +49,7 @@ void Amarok::Slider::wheelEvent(QWheelEvent* e) {
// Position Slider (horizontal)
int step = e->delta() * 1500 / 18;
int nval = QSlider::value() + step;
nval = qMax(nval, minimum());
nval = qMin(nval, maximum());
int nval = qBound(minimum(), QSlider::value() + step, maximum());
QSlider::setValue(nval);
@ -274,9 +272,8 @@ void Amarok::VolumeSlider::slideEvent(QMouseEvent* e) {
}
void Amarok::VolumeSlider::wheelEvent(QWheelEvent* e) {
const uint step = e->delta() / 30;
const uint step = e->delta() / (e->orientation() == Qt::Vertical ? 30 : -30);
QSlider::setValue(QSlider::value() + step);
emit sliderReleased(value());
}