mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-23 16:28:19 +01:00
parent
8f84a53273
commit
3aac164f1e
@ -49,9 +49,7 @@ void Amarok::Slider::wheelEvent(QWheelEvent* e) {
|
|||||||
|
|
||||||
// Position Slider (horizontal)
|
// Position Slider (horizontal)
|
||||||
int step = e->delta() * 1500 / 18;
|
int step = e->delta() * 1500 / 18;
|
||||||
int nval = QSlider::value() + step;
|
int nval = qBound(minimum(), QSlider::value() + step, maximum());
|
||||||
nval = qMax(nval, minimum());
|
|
||||||
nval = qMin(nval, maximum());
|
|
||||||
|
|
||||||
QSlider::setValue(nval);
|
QSlider::setValue(nval);
|
||||||
|
|
||||||
@ -274,9 +272,8 @@ void Amarok::VolumeSlider::slideEvent(QMouseEvent* e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Amarok::VolumeSlider::wheelEvent(QWheelEvent* 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);
|
QSlider::setValue(QSlider::value() + step);
|
||||||
|
|
||||||
emit sliderReleased(value());
|
emit sliderReleased(value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user