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(); int delta = event->pos().y() - this->lastMousePosition_.y();
setDesiredValue(this->desiredValue_ + setDesiredValue(
qreal(delta) / this->desiredValue_ +
std::max<qreal>(0.00000002, this->trackHeight_ * (qreal(delta) / std::max<qreal>(0.00000002, this->trackHeight_)) *
this->maximum_)); this->maximum_);
} }
this->lastMousePosition_ = event->pos(); this->lastMousePosition_ = event->pos();