Created
April 30, 2010 00:31
-
-
Save rentzsch/384509 to your computer and use it in GitHub Desktop.
This file contains 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
NSPopUpButton *popup = NSToolbarSizeModeSmall == [toolbar sizeMode] | |
? [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 40.0, 24.0)] autorelease] | |
: [[[NSPopUpButton alloc] initWithFrame:NSMakeRect(0.0, 0.0, 48.0, 32.0)] autorelease]; | |
[[popup cell] setControlSize:NSSmallControlSize]; | |
[popup setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; | |
destinationPopup = [popup retain]; | |
[result setView:popup]; [popup release]; | |
// Eww, hard-coded size futzing: | |
NSSize size = [popup bounds].size; | |
size.width *= 3; | |
[result setMinSize:size]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment