diff --git a/src/widgets/Scrollbar.cpp b/src/widgets/Scrollbar.cpp index 1bc3c19cf..dcf9c3c08 100644 --- a/src/widgets/Scrollbar.cpp +++ b/src/widgets/Scrollbar.cpp @@ -356,10 +356,10 @@ void Scrollbar::mouseMoveEvent(QMouseEvent *event) { int delta = event->pos().y() - this->lastMousePosition_.y(); - setDesiredValue(this->desiredValue_ + - qreal(delta) / - std::max(0.00000002, this->trackHeight_ * - this->maximum_)); + setDesiredValue( + this->desiredValue_ + + (qreal(delta) / std::max(0.00000002, this->trackHeight_)) * + this->maximum_); } this->lastMousePosition_ = event->pos();