- The bug in Tracker (previous commit) uncovered a bug in BScrollBar's thumb positioning. The + 1.0 was well intented and produced the right effect unless fMax-fMin was too close to 1.0. It could
leave a unusable gap on the right (or down) of the thumb. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25897 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ed27e7aef6
commit
6d4ab8b00e
|
@ -1171,9 +1171,12 @@ BScrollBar::_UpdateThumbFrame()
|
|||
thumbSize = floorf(thumbSize + 0.5);
|
||||
thumbSize--;
|
||||
|
||||
// the thumb can be scrolled within the remaining area "maxSize - thumbSize"
|
||||
float offset = floorf(((fValue - fMin) / (fMax - fMin + 1.0))
|
||||
* (maxSize - thumbSize));
|
||||
// the thumb can be scrolled within the remaining area "maxSize - thumbSize - 1.0"
|
||||
float offset = 0.0;
|
||||
if (fMax > fMin) {
|
||||
offset = floorf(((fValue - fMin) / (fMax - fMin))
|
||||
* (maxSize - thumbSize - 1.0));
|
||||
}
|
||||
|
||||
if (_DoubleArrows()) {
|
||||
offset += buttonSize * 2;
|
||||
|
|
Loading…
Reference in New Issue