make the bookmark toolbar folder popup menu use the normal font size (bug 229405)

This commit is contained in:
pinkerton%aol.net 2003-12-29 06:56:24 +00:00
Родитель 008fea057f
Коммит 10b30cedf5
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -251,9 +251,16 @@
[self showFolderPopup:[NSApp currentEvent]]; [self showFolderPopup:[NSApp currentEvent]];
} }
//
// -showFolderPopup:
//
// For bookmarks that are folders, display their children in a menu. Uses a transient
// NSPopUpButtonCell to handle the menu tracking. Even though the toolbar is drawn
// at 11pt, use the normal font size for these submenus. Not only do context menus use
// this size, it's easier on the eyes.
//
- (void)showFolderPopup:(NSEvent*)event - (void)showFolderPopup:(NSEvent*)event
{ {
NSMenu* popupMenu = [[NSMenu alloc] init]; NSMenu* popupMenu = [[NSMenu alloc] init];
// dummy first item // dummy first item
[popupMenu addItemWithTitle:@"" action:NULL keyEquivalent:@""]; [popupMenu addItemWithTitle:@"" action:NULL keyEquivalent:@""];
@ -262,7 +269,6 @@
// use a temporary NSPopUpButtonCell to display the menu. // use a temporary NSPopUpButtonCell to display the menu.
NSPopUpButtonCell *popupCell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:YES]; NSPopUpButtonCell *popupCell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:YES];
[popupCell setMenu: popupMenu]; [popupCell setMenu: popupMenu];
[popupCell setFont:[NSFont labelFontOfSize: 11.0]];
[popupCell trackMouse:event inRect:[self bounds] ofView:self untilMouseUp:YES]; [popupCell trackMouse:event inRect:[self bounds] ofView:self untilMouseUp:YES];
[popupCell release]; [popupCell release];
[bmMenu release]; [bmMenu release];