Bugfixes for page scrolling.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4396 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-06-11 07:22:37 +00:00
parent 8aba8fdfb4
commit 8c1c980464
3 changed files with 68 additions and 8 deletions

View file

@ -294,18 +294,40 @@ static Class rulerViewClass = nil;
_knobMoved = YES;
else
{
//FIXME in a page scroll, amount should be the portion of the view that
// stays visible, not the one that disapears
if (hitPart == NSScrollerIncrementLine)
amount = _lineScroll;
else if (hitPart == NSScrollerIncrementPage)
amount = _pageScroll;
{
amount = _lineScroll;
}
else if (hitPart == NSScrollerDecrementLine)
amount = -_lineScroll;
{
amount = -_lineScroll;
}
else if (hitPart == NSScrollerIncrementPage)
{
if (scroller == _horizScroller)
{
amount = clipViewBounds.size.width - _pageScroll;
}
else
{
amount = clipViewBounds.size.height - _pageScroll;
}
}
else if (hitPart == NSScrollerDecrementPage)
amount = -_pageScroll;
{
if (scroller == _horizScroller)
{
amount = _pageScroll - clipViewBounds.size.width;
}
else
{
amount = _pageScroll - clipViewBounds.size.height;
}
}
else
return;
{
return;
}
}
if (!_knobMoved) /* button scrolling */