Changeset 3777 for trunk/Views

Show
Ignore:
Timestamp:
02/06/08 09:04:24 (10 months ago)
Author:
timothy
Message:

Use correct source list style on Leopard. Patch by eschaton. #1134

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Views/JVSideOutlineView.m

    r3259 r3777  
    1111} 
    1212 
     13@interface NSOutlineView (NSOutlineViewPrivate) 
     14- (NSColor *) _highlightColorForCell:(NSCell *) cell; 
     15- (void) _highlightRow:(int) row clipRect:(NSRect) clip; 
     16@end 
     17 
    1318@implementation JVSideOutlineView 
    1419- (NSColor *) _highlightColorForCell:(NSCell *) cell { 
     20        if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 && [super respondsToSelector:_cmd] ) 
     21                return [super _highlightColorForCell:cell]; 
     22 
    1523    // return nil to prevent normal selection drawing 
    1624    return nil; 
     
    1826 
    1927- (void) _highlightRow:(int) row clipRect:(NSRect) clip { 
     28        if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 && [super respondsToSelector:_cmd] ) 
     29                return [super _highlightRow:row clipRect:clip]; 
     30 
    2031        NSRect highlight = [self rectOfRow:row]; 
    2132 
     
    4253 
    4354- (void) drawBackgroundInClipRect:(NSRect) clipRect { 
     55        if( floor( NSAppKitVersionNumber ) > NSAppKitVersionNumber10_4 && [super respondsToSelector:_cmd] ) 
     56                return [super drawBackgroundInClipRect:clipRect]; 
     57 
    4458        static NSColor *backgroundColor = nil; 
    4559        if( ! backgroundColor ) 
    4660                backgroundColor = [[NSColor colorWithCalibratedRed:( 229. / 255. ) green:( 237. / 255. ) blue:( 247. / 255. ) alpha:1.] retain]; 
     61 
    4762        [backgroundColor set]; 
    4863        NSRectFill( clipRect );