Created
August 15, 2012 19:46
-
-
Save dchest/3363006 to your computer and use it in GitHub Desktop.
CRTransparentSearchFieldCell -- transparent search field cell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Cocoa/Cocoa.h> | |
@interface CRTransparentSearchFieldCell : NSSearchFieldCell | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "CRTransparentSearchFieldCell.h" | |
@implementation CRTransparentSearchFieldCell | |
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { | |
// Draw border. | |
[[NSColor colorWithDeviceWhite:0 alpha:0.4] set]; | |
[[NSBezierPath bezierPathWithRoundedRect:NSInsetRect(cellFrame, 0.5, 0.5) | |
xRadius:cellFrame.size.height/2.0 | |
yRadius:cellFrame.size.height/2.0] stroke]; | |
// Draw buttons and text. | |
[self drawInteriorWithFrame:cellFrame inView:controlView]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oops, there's a bug.