diff --git a/src/widgets/scrollbar.cpp b/src/widgets/scrollbar.cpp index 1acb0eb14..4b662d532 100644 --- a/src/widgets/scrollbar.cpp +++ b/src/widgets/scrollbar.cpp @@ -226,7 +226,7 @@ void Scrollbar::paintEvent(QPaintEvent *) int w = this->width(); float y = 0; - float dY = (this->height() - MIN_THUMB_HEIGHT) / snapshotLength; + float dY = (float)(this->height() + MIN_THUMB_HEIGHT) / (float)snapshotLength; int highlightHeight = std::ceil(dY); for (int i = 0; i < snapshotLength; i++) {