Skip to content

Instantly share code, notes, and snippets.

@danielpunkass
Created May 6, 2009 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielpunkass/107719 to your computer and use it in GitHub Desktop.
Save danielpunkass/107719 to your computer and use it in GitHub Desktop.
@implementation JimPopUpButtonCell
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
NSRect rect = [self drawingRectForBounds: cellFrame];
rect.size.width -= 17; // chop off the popup indicator
NSSize imageSize = NSMakeSize(12, 12);
rect.origin.x += (rect.size.width - imageSize.width) / 2.0;
rect.origin.y -= (rect.size.height - imageSize.height) / 2.0;
rect.size = imageSize;
NSFrameRect(rect);
NSBeep();
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment