mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
Indented
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13785 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
baa0aa5e6c
commit
502dc13cef
1 changed files with 32 additions and 13 deletions
|
@ -305,26 +305,38 @@ 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;
|
||||||
[self setNeedsDisplay: YES];
|
[self setNeedsDisplay: YES];
|
||||||
|
@ -333,8 +345,10 @@ 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;
|
||||||
[self setNeedsDisplay: YES];
|
[self setNeedsDisplay: YES];
|
||||||
|
@ -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;
|
||||||
|
@ -864,7 +882,7 @@ static NSColor *scrollBarColor = nil;
|
||||||
|
|
||||||
/* calc the slot Height */
|
/* calc the slot Height */
|
||||||
slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone
|
slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone
|
||||||
? 0 : buttonsSize);
|
? 0 : buttonsSize);
|
||||||
knobHeight = _knobProportion * slotHeight;
|
knobHeight = _knobProportion * slotHeight;
|
||||||
knobHeight = (float)floor(knobHeight);
|
knobHeight = (float)floor(knobHeight);
|
||||||
if (knobHeight < buttonsWidth)
|
if (knobHeight < buttonsWidth)
|
||||||
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue