diff options
Diffstat (limited to 'Frameworks/BWToolkitFramework.framework/BWUnanchoredButton.m')
-rw-r--r-- | Frameworks/BWToolkitFramework.framework/BWUnanchoredButton.m | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Frameworks/BWToolkitFramework.framework/BWUnanchoredButton.m b/Frameworks/BWToolkitFramework.framework/BWUnanchoredButton.m new file mode 100644 index 00000000..e0b5c39c --- /dev/null +++ b/Frameworks/BWToolkitFramework.framework/BWUnanchoredButton.m @@ -0,0 +1,40 @@ +// +// 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" + +@implementation BWUnanchoredButton + +- (id)initWithCoder:(NSCoder *)decoder; +{ + if ((self = [super initWithCoder:decoder]) != nil) + { + if ([BWAnchoredButtonBar wasBorderedBar]) + topAndLeftInset = NSMakePoint(0, 0); + else + topAndLeftInset = NSMakePoint(1, 1); + } + return self; +} + +- (void)mouseDown:(NSEvent *)theEvent +{ + [self bringToFront]; + [super mouseDown:theEvent]; +} + +- (NSRect)frame +{ + NSRect frame = [super frame]; + frame.size.height = 22; + return frame; +} + +@end |