mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
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:
parent
096889144d
commit
a8d583157b
1 changed files with 7 additions and 2 deletions
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue