Changeset 3953

Show
Ignore:
Timestamp:
03/25/06 09:51:13 (3 years ago)
Author:
morris
Message:

Center nick vertically when there's no status

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCUserCell.m

    r3627 r3953  
    130130         
    131131        nick = [(NSDictionary *) [self objectValue] objectForKey:WCUserCellNickKey]; 
     132        status = [(NSDictionary *) [self objectValue] objectForKey:WCUserCellStatusKey]; 
    132133 
    133         if([self controlSize] == NSRegularControlSize) 
    134                 rect = NSMakeRect(frame.origin.x, frame.origin.y + 1.0, frame.size.width, 17.0); 
    135         else 
     134        if([self controlSize] == NSRegularControlSize) { 
     135                if([status length] > 0) 
     136                        rect = NSMakeRect(frame.origin.x, frame.origin.y + 1.0, frame.size.width, 17.0); 
     137                else 
     138                        rect = NSMakeRect(frame.origin.x, frame.origin.y + 8.0, frame.size.width, 17.0); 
     139        } else { 
    136140                rect = NSMakeRect(frame.origin.x, frame.origin.y - 1.0, frame.size.width, 17.0); 
     141        } 
    137142 
    138143        [_nickCell setAttributedStringValue: 
     
    141146        [_nickCell drawWithFrame:rect inView:view]; 
    142147         
    143         if([self controlSize] == NSRegularControlSize) { 
    144                 status = [(NSDictionary *) [self objectValue] objectForKey:WCUserCellStatusKey]; 
    145                  
     148        if([self controlSize] == NSRegularControlSize && [status length] > 0) { 
    146149                rect = NSMakeRect(frame.origin.x, frame.origin.y + 19.0, frame.size.width, 14.0); 
    147150                [_statusCell setAttributedStringValue: