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