Changeset 4132


Ignore:
Timestamp:
Dec 12, 2007, 5:01:31 AM (15 years ago)
Author:
livings124
Message:

use a simpler method for determining text color of table cells on leopard

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r4131 r4132  
    251251        [fWindow setContentBorderThickness: [[fTableView enclosingScrollView] frame].origin.y forEdge: NSMinYEdge];
    252252   
    253     if (![NSApp isOnLeopardOrBetter])
    254     {
    255         //set info and filter keyboard shortcuts
    256         /*[fNextInfoTabItem setKeyEquivalent: [NSString stringWithCharacters: & NSRightArrowFunctionKey length: 1]];
    257         [fPrevInfoTabItem setKeyEquivalent: [NSString stringWithCharacters: & NSLeftArrowFunctionKey length: 1]];
    258        
    259         [fNextFilterItem setKeyEquivalent: [NSString stringWithCharacters: & NSRightArrowFunctionKey length: 1]];
    260         [fNextFilterItem setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask];
    261         [fPrevFilterItem setKeyEquivalent: [NSString stringWithCharacters: & NSLeftArrowFunctionKey length: 1]];
    262         [fPrevFilterItem setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask];*/
    263     }
    264    
    265253    if ([NSApp isOnLeopardOrBetter])
    266254        [[fTotalTorrentsField cell] setBackgroundStyle: NSBackgroundStyleRaised];
    267255   
    268     //set up filter bar
     256   
    269257    if (![NSApp isOnLeopardOrBetter])
    270258    {
     
    287275    }
    288276   
     277    //set up filter bar
    289278    NSView * contentView = [fWindow contentView];
    290279    NSSize windowSize = [contentView convertSize: [fWindow frame].size fromView: nil];
  • trunk/macosx/FileNameCell.m

    r4019 r4132  
    2626#import "FileOutlineView.h"
    2727#import "Torrent.h"
     28#import "NSApplicationAdditions.h"
    2829#import "NSStringAdditions.h"
    2930
     
    9293    //title
    9394    NSColor * specialColor = nil;
    94     if ([self isHighlighted]
     95    if ([NSApp isOnLeopardOrBetter] ? [self backgroundStyle] == NSBackgroundStyleDark : [self isHighlighted]
    9596            && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]])
    9697        specialColor = [NSColor whiteColor];
  • trunk/macosx/TorrentCell.m

    r4019 r4132  
    2525#import "TorrentCell.h"
    2626#import "TorrentTableView.h"
     27#import "NSApplicationAdditions.h"
    2728#import "NSStringAdditions.h"
    2829#import "CTGradientAdditions.h"
     
    224225    //text color
    225226    NSColor * titleColor, * statusColor;
    226     if ([self isHighlighted]
     227    if ([NSApp isOnLeopardOrBetter] ? [self backgroundStyle] == NSBackgroundStyleDark : [self isHighlighted]
    227228        && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]])
    228229    {
Note: See TracChangeset for help on using the changeset viewer.