This commit is contained in:
SLCH 2020-05-07 02:21:08 +04:00 committed by GitHub
parent ef9c631c65
commit 14783d52a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -356,10 +356,10 @@ void Scrollbar::mouseMoveEvent(QMouseEvent *event)
{
int delta = event->pos().y() - this->lastMousePosition_.y();
setDesiredValue(this->desiredValue_ +
qreal(delta) /
std::max<qreal>(0.00000002, this->trackHeight_ *
this->maximum_));
setDesiredValue(
this->desiredValue_ +
(qreal(delta) / std::max<qreal>(0.00000002, this->trackHeight_)) *
this->maximum_);
}
this->lastMousePosition_ = event->pos();