in the groups menu, show the "blank group" image; resize the images in the groups menu appropriately
This commit is contained in:
parent
62f034cdbd
commit
1cb0451c05
|
@ -27,6 +27,7 @@
|
|||
#import "NSBezierPathAdditions.h"
|
||||
|
||||
#define ICON_WIDTH 16.0
|
||||
#define ICON_WIDTH_SMALL 12.0
|
||||
|
||||
@interface GroupsController (Private)
|
||||
|
||||
|
@ -251,6 +252,16 @@ GroupsController * fGroupsInstance = nil;
|
|||
keyEquivalent: @""];
|
||||
[item setTarget: target];
|
||||
[item setTag: -1];
|
||||
|
||||
NSImage * icon = [[NSImage imageNamed: @"GroupsNoneTemplate.png"] copy];
|
||||
if (small)
|
||||
{
|
||||
[icon setScalesWhenResized: YES];
|
||||
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
||||
}
|
||||
[item setImage: icon];
|
||||
[icon release];
|
||||
|
||||
[menu addItem: item];
|
||||
[item release];
|
||||
|
||||
|
@ -261,10 +272,17 @@ GroupsController * fGroupsInstance = nil;
|
|||
item = [[NSMenuItem alloc] initWithTitle: [dict objectForKey: @"Name"] action: action keyEquivalent: @""];
|
||||
[item setTarget: target];
|
||||
|
||||
#warning factor in size
|
||||
[item setImage: [self imageForGroup: dict]];
|
||||
[item setTag: [[dict objectForKey: @"Index"] intValue]];
|
||||
|
||||
NSImage * icon = [[self imageForGroup: dict] copy];
|
||||
if (small)
|
||||
{
|
||||
[icon setScalesWhenResized: YES];
|
||||
[icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
|
||||
}
|
||||
[item setImage: icon];
|
||||
[icon release];
|
||||
|
||||
[menu addItem: item];
|
||||
[item release];
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 274 B After Width: | Height: | Size: 326 B |
Loading…
Reference in New Issue