-- (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView
-{
- NSBezierPath *path = [NSBezierPath bezierPath];
- float ch = rect.size.height;
- float cw = rect.size.width;
- float radius = ( ch / 2 );
- NSPoint pointA = NSMakePoint( (ch / 2) , 0.0 );
- NSPoint pointB = NSMakePoint( (cw - (ch / 2)) , 0.0 );
-// NSPoint pointC = NSMakePoint( (cw - (ch / 2)) , ch );
- NSPoint pointD = NSMakePoint( (ch / 2) , ch );
- NSPoint lCtr = NSMakePoint( (ch / 2) , (ch / 2) );
- NSPoint rCtr = NSMakePoint( (cw - (ch / 2)) , (ch / 2) );
- float alpha = 0.45;
-
- [path moveToPoint:pointA];
- [path lineToPoint:pointB];
- [path appendBezierPathWithArcWithCenter:rCtr
- radius:radius
- startAngle:270.0
- endAngle:90.0];
- [path lineToPoint:pointD];
- [path appendBezierPathWithArcWithCenter:lCtr
- radius:radius
- startAngle:90.0
- endAngle:270.0];
-
- if ( [self isHighlighted] ) {
- alpha = 0.60;
- }
-
- [[NSColor colorWithCalibratedWhite:0.15 alpha:alpha] set];
- [path fill];
+- (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView {
+ NSBezierPath *path = [NSBezierPath bezierPath];
+ float ch = rect.size.height;
+ float cw = rect.size.width;
+ float radius = (ch / 2);
+ NSPoint pointA = NSMakePoint((ch / 2), 0.0);
+ NSPoint pointB = NSMakePoint((cw - (ch / 2)), 0.0);
+// NSPoint pointC = NSMakePoint((cw - (ch / 2)), ch);
+ NSPoint pointD = NSMakePoint((ch / 2), ch);
+ NSPoint lCtr = NSMakePoint((ch / 2), (ch / 2));
+ NSPoint rCtr = NSMakePoint((cw - (ch / 2)), (ch / 2));
+ float alpha = 0.45;
+
+ [path moveToPoint:pointA];
+ [path lineToPoint:pointB];
+ [path appendBezierPathWithArcWithCenter:rCtr radius:radius startAngle:270.0 endAngle:90.0];
+ [path lineToPoint:pointD];
+ [path appendBezierPathWithArcWithCenter:lCtr radius:radius startAngle:90.0 endAngle:270.0];
+
+ if ([self isHighlighted]) {
+ alpha = 0.60;
+ }
+
+ [[NSColor colorWithCalibratedWhite:0.15 alpha:alpha] set];
+ [path fill];