diff --git a/macosx/StatusBarView.h b/macosx/StatusBarView.h index 3848c3d12..6d2975fa3 100644 --- a/macosx/StatusBarView.h +++ b/macosx/StatusBarView.h @@ -29,6 +29,9 @@ @interface StatusBarView : NSView { BOOL fShow; + + CTGradient * fGradient; + NSColor * fGrayBorderColor; } - (void) setShowOnTiger: (BOOL) show; diff --git a/macosx/StatusBarView.m b/macosx/StatusBarView.m index 5c71f70bf..a59e791eb 100644 --- a/macosx/StatusBarView.m +++ b/macosx/StatusBarView.m @@ -33,12 +33,20 @@ if ((self = [super initWithFrame: rect])) { fShow = [NSApp isOnLeopardOrBetter]; + + #warning possible remove (don't forget import, etc) + /*NSColor * startingColor = [NSColor colorWithCalibratedRed: 208.0/255.0 green: 208.0/255.0 blue: 208.0/255.0 alpha: 1.0]; + NSColor * endingColor = [NSColor colorWithCalibratedRed: 233.0/255.0 green: 233.0/255.0 blue: 233.0/255.0 alpha: 1.0]; + fGradient = [[CTGradient gradientWithBeginningColor: startingColor endingColor: endingColor] retain];*/ + + fGrayBorderColor = [[NSColor colorWithCalibratedRed: 171.0/255.0 green: 171.0/255.0 blue: 171.0/255.0 alpha: 1.0] retain]; } return self; } - (void) dealloc { + [fGrayBorderColor release]; [super dealloc]; } @@ -56,21 +64,24 @@ { if (fShow) { + //[fGradient fillRect: rect angle: 90]; [[NSColor controlColor] set]; NSRectFill(rect); - NSRect whiteBorderRect = NSMakeRect([self bounds].origin.x, NSMaxY([self bounds]) - 1, [self bounds].size.width, 1); - if (NSIntersectsRect(whiteBorderRect, rect)) + NSRect bounds = [self bounds]; + + NSRect lineBorderRect = NSMakeRect(bounds.origin.x, NSMaxY(bounds) - 1.0, bounds.size.width, 1.0); + if (NSIntersectsRect(lineBorderRect, rect)) { [[NSColor whiteColor] set]; - NSRectFill(whiteBorderRect); + NSRectFill(lineBorderRect); } - NSRect grayBorderRect = NSMakeRect([self bounds].origin.x, 0, [self bounds].size.width, 1); - if (NSIntersectsRect(grayBorderRect, rect)) + lineBorderRect.origin.y = 0.0; + if (NSIntersectsRect(lineBorderRect, rect)) { - [[NSColor colorWithCalibratedRed: 188.0/255.0 green: 188.0/255.0 blue: 188.0/255.0 alpha: 1.0] set]; - NSRectFill(grayBorderRect); + [fGrayBorderColor set]; + NSRectFill(lineBorderRect); } } }