Changeset 5983


Ignore:
Timestamp:
May 31, 2008, 2:52:49 AM (14 years ago)
Author:
livings124
Message:

in the groups menu, show the "blank group" image; resize the images in the groups menu appropriately

Location:
trunk/macosx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/GroupsController.m

    r5982 r5983  
    2828
    2929#define ICON_WIDTH 16.0
     30#define ICON_WIDTH_SMALL 12.0
    3031
    3132@interface GroupsController (Private)
     
    252253    [item setTarget: target];
    253254    [item setTag: -1];
     255   
     256    NSImage * icon = [[NSImage imageNamed: @"GroupsNoneTemplate.png"] copy];
     257    if (small)
     258    {
     259        [icon setScalesWhenResized: YES];
     260        [icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
     261    }
     262    [item setImage: icon];
     263    [icon release];
     264   
    254265    [menu addItem: item];
    255266    [item release];
     
    262273        [item setTarget: target];
    263274       
    264         #warning factor in size
    265         [item setImage: [self imageForGroup: dict]];
    266275        [item setTag: [[dict objectForKey: @"Index"] intValue]];
     276       
     277        NSImage * icon = [[self imageForGroup: dict] copy];
     278        if (small)
     279        {
     280            [icon setScalesWhenResized: YES];
     281            [icon setSize: NSMakeSize(ICON_WIDTH_SMALL, ICON_WIDTH_SMALL)];
     282        }
     283        [item setImage: icon];
     284        [icon release];
    267285       
    268286        [menu addItem: item];
Note: See TracChangeset for help on using the changeset viewer.