@implementation ITGrayRoundedView
+- (id)initWithFrame:(NSRect)frameRect
+{
+ if ( (self = [super initWithFrame:frameRect]) ) {
+ _path = [[NSBezierPath bezierPath] retain];
+ }
+
+ return self;
+}
+
- (void)drawRect:(NSRect)theRect
{
- NSBezierPath *path = [NSBezierPath bezierPath];
float vh = NSHeight(theRect);
float vw = NSWidth(theRect);
- [path moveToPoint:NSMakePoint( 0.0, (vh - 24.0) )]; // first point
- [path curveToPoint:NSMakePoint( 24.0, vh )
+
+ [_path autorelease];
+ _path = [[NSBezierPath bezierPath] retain];
+
+ [_path moveToPoint:NSMakePoint( 0.0, (vh - 24.0) )]; // first point
+ [_path curveToPoint:NSMakePoint( 24.0, vh )
controlPoint1:NSMakePoint( 0.0, (vh - 11.0) )
controlPoint2:NSMakePoint( 11.0, vh )]; // top-left curve
- [path lineToPoint:NSMakePoint( (vw - 24.0), vh )]; // top line
- [path curveToPoint:NSMakePoint( vw, (vh - 24.0) )
+ [_path lineToPoint:NSMakePoint( (vw - 24.0), vh )]; // top line
+ [_path curveToPoint:NSMakePoint( vw, (vh - 24.0) )
controlPoint1:NSMakePoint( (vw - 11.0), vh )
controlPoint2:NSMakePoint( vw, (vh - 11.0) )]; // top-right curve
- [path lineToPoint:NSMakePoint( vw, 24.0 )]; // right line
- [path curveToPoint:NSMakePoint( (vw - 24.0), 0.0 )
+ [_path lineToPoint:NSMakePoint( vw, 24.0 )]; // right line
+ [_path curveToPoint:NSMakePoint( (vw - 24.0), 0.0 )
controlPoint1:NSMakePoint( vw, 11.0 )
controlPoint2:NSMakePoint( (vw - 11.0), 0.0 )]; // bottom-right curve
- [path lineToPoint:NSMakePoint( 24.0, 0.0 )]; // bottom line
- [path curveToPoint:NSMakePoint( 0.0, 24.0 )
+ [_path lineToPoint:NSMakePoint( 24.0, 0.0 )]; // bottom line
+ [_path curveToPoint:NSMakePoint( 0.0, 24.0 )
controlPoint1:NSMakePoint( 11.0, 0.0 )
controlPoint2:NSMakePoint( 0.0, 11.0 )]; // bottom-left curve
- [path closePath]; // left line
+ [_path closePath]; // left line
[[NSColor colorWithCalibratedWhite:0.0 alpha:0.15] set];
- [path fill];
+ [_path fill];
}
- (BOOL)isOpaque
[button setBezelStyle:1001];
[button setFont:[NSFont fontWithName:@"Lucida Grande Bold" size:14]];
[button setTitle:@"Launch Manually"];
- [button setButtonType:NSMomentaryLight];
[button sizeToFit];
[button setFrameSize:NSMakeSize([button frame].size.width + 8, 24)];
[testTextField setCastsShadow:YES];
// Add 4.0 to the final textHeight to accomodate the shadow.
textHeight += 4.0;
-
+ NSLog(@"%f", textHeight);
// Set the content height to the greater of the text and image heights.
contentHeight = ( ( imageHeight > textHeight ) ? imageHeight : textHeight );
[textField setTextColor:[NSColor whiteColor]];
[textField setCastsShadow:YES];
[textField setStringValue:text];
+ [textField setShadowSaturation:[swShadowSaturation floatValue]];
[[statusWindow contentView] addSubview:textField];
[[statusWindow contentView] setNeedsDisplay:YES];
swBackgroundTypePopup = NSPopUpButton;
swDefinedPositionPopup = NSPopUpButton;
swSampleTextView = NSTextView;
+ swShadowSaturation = NSTextField;
swSpeedSlider = NSSlider;
swVanishDelay = NSTextField;
swVanishModePopup = NSPopUpButton;
{CLASS = ITBevelView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = ITButton; LANGUAGE = ObjC; SUPERCLASS = NSButton; },
{CLASS = ITButtonCell; LANGUAGE = ObjC; SUPERCLASS = NSButtonCell; },
+ {CLASS = ITGrayRoundedView; LANGUAGE = ObjC; SUPERCLASS = NSView; },
{CLASS = ITLED; LANGUAGE = ObjC; SUPERCLASS = NSControl; },
{CLASS = ITLEDCell; LANGUAGE = ObjC; SUPERCLASS = NSActionCell; },
{CLASS = ITTabView; LANGUAGE = ObjC; SUPERCLASS = NSTabView; },