Adium

Changeset 23872

Show
Ignore:
Timestamp:
06/09/2008 11:13:06 AM (6 months ago)
Author:
evands
Message:

When right-aligning text, indent from the right. Fixes #9994

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/Adium Framework/Source/AIListCell.m

    r23830 r23872  
    277277                cellFrame.origin.y += [self topPadding]; 
    278278                cellFrame.size.height -= [self bottomPadding] + [self topPadding]; 
    279                 cellFrame.origin.x += [self leftPadding] + [self indentation]; 
    280                 cellFrame.size.width -= [self rightPadding] + [self leftPadding] + [self indentation]; 
    281  
     279                cellFrame.origin.x += [self leftPadding]; 
     280                cellFrame.size.width -= [self rightPadding] + [self leftPadding]; 
     281 
     282                switch ([self textAlignment]) { 
     283                        case NSRightTextAlignment: 
     284                                //Right alignment indents on the right 
     285                                cellFrame.size.width -= [self indentation]; 
     286                                break; 
     287                        default: 
     288                                //All other alignments indent on the left 
     289                                cellFrame.origin.x += [self indentation]; 
     290                                cellFrame.size.width -= [self indentation]; 
     291                                break; 
     292                } 
    282293                [self drawContentWithFrame:cellFrame]; 
    283294        }