Source

//// BWUnanchoredButton.m// BWToolkit//// Created by Brandon Walkin (www.brandonwalkin.com)// All code is provided under the New BSD license.//#import "BWUnanchoredButton.h"#import "BWAnchoredButtonBar.h"#import "NSView+BWAdditions.h"@implementationBWUnanchoredButton-(id)initWithCoder:(NSCoder*)decoder;{if((self=[superinitWithCoder:decoder])!=nil){if([BWAnchoredButtonBarwasBorderedBar])topAndLeftInset=NSMakePoint(0,0);elsetopAndLeftInset=NSMakePoint(1,1);}returnself;}-(void)mouseDown:(NSEvent*)theEvent{[selfbwBringToFront];[supermouseDown:theEvent];}-(NSRect)frame{NSRectframe=[superframe];frame.size.height=22;returnframe;}@end