From 502dc13cef61f52af105b0450511a05aec7b4b71 Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 6 Jun 2002 09:38:11 +0000 Subject: [PATCH] Indented git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13785 72102866-910b-0410-8b05-ffd578937521 --- Source/NSScroller.m | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/Source/NSScroller.m b/Source/NSScroller.m index 7c1f19f00..4385f1abd 100644 --- a/Source/NSScroller.m +++ b/Source/NSScroller.m @@ -305,26 +305,38 @@ static NSColor *scrollBarColor = nil; if (_arrowsPosition == NSScrollerArrowsNone) { if (size >= scrollerWidth + 2) - _usableParts = NSAllScrollerParts; + { + _usableParts = NSAllScrollerParts; + } else - _usableParts = NSNoScrollerParts; + { + _usableParts = NSNoScrollerParts; + } } else { if (size >= 3 * scrollerWidth + 4) - _usableParts = NSAllScrollerParts; + { + _usableParts = NSAllScrollerParts; + } else if (size >= 2 * scrollerWidth + 3) - _usableParts = NSOnlyScrollerArrows; + { + _usableParts = NSOnlyScrollerArrows; + } else - _usableParts = NSNoScrollerParts; + { + _usableParts = NSNoScrollerParts; + } } } - (void) setEnabled: (BOOL)flag { if (_isEnabled == flag) - return; - + { + return; + } + _isEnabled = flag; _cacheValid = NO; [self setNeedsDisplay: YES]; @@ -333,8 +345,10 @@ static NSColor *scrollBarColor = nil; - (void) setArrowsPosition: (NSScrollArrowPosition)where { if (_arrowsPosition == where) - return; - + { + return; + } + _arrowsPosition = where; _cacheValid = NO; [self setNeedsDisplay: YES]; @@ -408,9 +422,13 @@ static NSColor *scrollBarColor = nil; [super setFrame: frameRect]; if (_isHorizontal) - _arrowsPosition = NSScrollerArrowsMinEnd; + { + _arrowsPosition = NSScrollerArrowsMinEnd; + } else - _arrowsPosition = NSScrollerArrowsMaxEnd; + { + _arrowsPosition = NSScrollerArrowsMaxEnd; + } _hitPart = NSScrollerNoPart; _cacheValid = NO; @@ -864,7 +882,7 @@ static NSColor *scrollBarColor = nil; /* calc the slot Height */ slotHeight = height - (_arrowsPosition == NSScrollerArrowsNone - ? 0 : buttonsSize); + ? 0 : buttonsSize); knobHeight = _knobProportion * slotHeight; knobHeight = (float)floor(knobHeight); if (knobHeight < buttonsWidth) @@ -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;