Change folder pop-up to pull-down

The menu contains two (non-selectable) “actions”. If we use a pop-up, we have to change the selection after the user select one of these actions, which isn’t the case with a pull-down menu.
This commit is contained in:
Allan Odgaard
2013-03-16 17:49:49 +01:00
parent b0a0df831a
commit 15c27135fd
2 changed files with 1 additions and 4 deletions

View File

@@ -1136,9 +1136,6 @@ static NSMutableSet* SymmetricDifference (NSMutableSet* aSet, NSMutableSet* anot
- (IBAction)orderFrontGoToFolder:(id)sender
{
if(_headerView.folderPopUpButton.selectedItem.action == _cmd)
[_headerView.folderPopUpButton selectItemAtIndex:0];
NSOpenPanel* panel = [NSOpenPanel openPanel];
[panel setCanChooseFiles:NO];
[panel setCanChooseDirectories:YES];

View File

@@ -20,7 +20,7 @@ static NSButton* OakCreateImageButton (NSString* imageName)
static NSPopUpButton* OakCreatePopUpButton ()
{
NSPopUpButton* res = [NSPopUpButton new];
NSPopUpButton* res = [[NSPopUpButton alloc] initWithFrame:NSZeroRect pullsDown:YES];
[[res cell] setBackgroundStyle:NSBackgroundStyleLight];
[res setContentCompressionResistancePriority:NSLayoutPriorityDefaultLow forOrientation:NSLayoutConstraintOrientationHorizontal];
[res setBordered:NO];