- 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:
@@ -1171,9 +1171,12 @@ BScrollBar::_UpdateThumbFrame()
|
|||||||
thumbSize = floorf(thumbSize + 0.5);
|
thumbSize = floorf(thumbSize + 0.5);
|
||||||
thumbSize--;
|
thumbSize--;
|
||||||
|
|
||||||
// the thumb can be scrolled within the remaining area "maxSize - thumbSize"
|
// the thumb can be scrolled within the remaining area "maxSize - thumbSize - 1.0"
|
||||||
float offset = floorf(((fValue - fMin) / (fMax - fMin + 1.0))
|
float offset = 0.0;
|
||||||
* (maxSize - thumbSize));
|
if (fMax > fMin) {
|
||||||
|
offset = floorf(((fValue - fMin) / (fMax - fMin))
|
||||||
|
* (maxSize - thumbSize - 1.0));
|
||||||
|
}
|
||||||
|
|
||||||
if (_DoubleArrows()) {
|
if (_DoubleArrows()) {
|
||||||
offset += buttonSize * 2;
|
offset += buttonSize * 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user