1
1
/******************************************************************************
2
* $Id: StatusBarView.m 7659 2009-01-10 23:37:37Z livings124 $
2
* $Id: StatusBarView.m 9520 2009-11-14 03:17:07Z livings124 $
4
4
* Copyright (c) 2006-2009 Transmission authors and contributors
44
44
- (void) drawRect: (NSRect) rect
46
NSRect lineBorderRect = NSMakeRect(rect.origin.x, [self bounds].size.height - 1.0f, rect.size.width, 1.0f);
47
if (NSIntersectsRect(lineBorderRect, rect))
49
[[NSColor whiteColor] set];
50
NSRectFill(lineBorderRect);
55
lineBorderRect.origin.y = 0.0f;
56
if (NSIntersectsRect(lineBorderRect, rect))
58
[fGrayBorderColor set];
59
NSRectFill(lineBorderRect);
65
[[NSColor controlColor] set];
48
NSColor * colorRects[3];
50
NSRect lineBorderRect = NSMakeRect(NSMinX(rect), NSHeight([self bounds]) - 1.0, NSWidth(rect), 1.0);
51
if (NSIntersectsRect(lineBorderRect, rect))
53
gridRects[count] = lineBorderRect;
54
colorRects[count] = [NSColor whiteColor];
57
rect.size.height -= 1.0;
60
lineBorderRect.origin.y = 0.0;
61
if (NSIntersectsRect(lineBorderRect, rect))
63
gridRects[count] = lineBorderRect;
64
colorRects[count] = fGrayBorderColor;
68
rect.size.height -= 1.0;
71
gridRects[count] = rect;
72
colorRects[count] = [NSColor controlColor];
75
NSRectFillListWithColors(gridRects, colorRects, count);