updateScoller fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19617 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-06-25 22:31:10 +00:00
parent 096889144d
commit a8d583157b

View file

@ -1382,8 +1382,7 @@ static NSTextFieldCell *titleCell;
// If there are not enough columns to scroll with
// then the column must be visible
if ((_lastColumnLoaded == 0) ||
(_lastColumnLoaded <= (num - 1)))
if ((_firstVisibleColumn == 0) && (_lastColumnLoaded < num))
{
[_horizontalScroller setEnabled: NO];
}
@ -1395,6 +1394,11 @@ static NSTextFieldCell *titleCell;
float i = _lastColumnLoaded - num + 1;
float f = 1 + ((_lastVisibleColumn - _lastColumnLoaded) / i);
if (_lastVisibleColumn > _lastColumnLoaded)
{
prop = (float)num / (float)(_lastVisibleColumn + 1);
}
[_horizontalScroller setFloatValue: f knobProportion: prop];
}
[_horizontalScroller setEnabled: YES];
@ -1884,6 +1888,7 @@ static NSTextFieldCell *titleCell;
}
[self updateScroller];
// Send the action to target
[self sendAction];