mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 06:30:47 +00:00
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:
parent
8aba8fdfb4
commit
8c1c980464
3 changed files with 68 additions and 8 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue