git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13785 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2002-06-06 09:38:11 +00:00
parent baa0aa5e6c
commit 502dc13cef

View file

@ -305,25 +305,37 @@ static NSColor *scrollBarColor = nil;
if (_arrowsPosition == NSScrollerArrowsNone)
{
if (size >= scrollerWidth + 2)
{
_usableParts = NSAllScrollerParts;
}
else
{
_usableParts = NSNoScrollerParts;
}
}
else
{
if (size >= 3 * scrollerWidth + 4)
{
_usableParts = NSAllScrollerParts;
}
else if (size >= 2 * scrollerWidth + 3)
{
_usableParts = NSOnlyScrollerArrows;
}
else
{
_usableParts = NSNoScrollerParts;
}
}
}
- (void) setEnabled: (BOOL)flag
{
if (_isEnabled == flag)
{
return;
}
_isEnabled = flag;
_cacheValid = NO;
@ -333,7 +345,9 @@ static NSColor *scrollBarColor = nil;
- (void) setArrowsPosition: (NSScrollArrowPosition)where
{
if (_arrowsPosition == where)
{
return;
}
_arrowsPosition = where;
_cacheValid = NO;
@ -408,9 +422,13 @@ static NSColor *scrollBarColor = nil;
[super setFrame: frameRect];
if (_isHorizontal)
{
_arrowsPosition = NSScrollerArrowsMinEnd;
}
else
{
_arrowsPosition = NSScrollerArrowsMaxEnd;
}
_hitPart = NSScrollerNoPart;
_cacheValid = NO;
@ -876,7 +894,8 @@ static NSColor *scrollBarColor = nil;
/* calc actual position */
y += knobPosition + (_arrowsPosition == NSScrollerArrowsMaxEnd
|| _arrowsPosition == NSScrollerArrowsNone ? 0 : buttonsSize);
|| _arrowsPosition == NSScrollerArrowsNone
? 0 : buttonsSize);
height = knobHeight;
width = buttonsWidth;
break;