made int division float division

This commit is contained in:
fourtf 2018-01-06 21:45:50 +01:00
parent 26170e4fdb
commit 6fec6514fa

View file

@ -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++) {