use a simpler method for determining text color of table cells on leopard
This commit is contained in:
parent
73ccb2e0c8
commit
bc295fe78e
|
@ -250,22 +250,10 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
if ([NSApp isOnLeopardOrBetter])
|
||||
[fWindow setContentBorderThickness: [[fTableView enclosingScrollView] frame].origin.y forEdge: NSMinYEdge];
|
||||
|
||||
if (![NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
//set info and filter keyboard shortcuts
|
||||
/*[fNextInfoTabItem setKeyEquivalent: [NSString stringWithCharacters: & NSRightArrowFunctionKey length: 1]];
|
||||
[fPrevInfoTabItem setKeyEquivalent: [NSString stringWithCharacters: & NSLeftArrowFunctionKey length: 1]];
|
||||
|
||||
[fNextFilterItem setKeyEquivalent: [NSString stringWithCharacters: & NSRightArrowFunctionKey length: 1]];
|
||||
[fNextFilterItem setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask];
|
||||
[fPrevFilterItem setKeyEquivalent: [NSString stringWithCharacters: & NSLeftArrowFunctionKey length: 1]];
|
||||
[fPrevFilterItem setKeyEquivalentModifierMask: NSCommandKeyMask | NSAlternateKeyMask];*/
|
||||
}
|
||||
|
||||
if ([NSApp isOnLeopardOrBetter])
|
||||
[[fTotalTorrentsField cell] setBackgroundStyle: NSBackgroundStyleRaised];
|
||||
|
||||
//set up filter bar
|
||||
|
||||
if (![NSApp isOnLeopardOrBetter])
|
||||
{
|
||||
[fNoFilterButton sizeToFit];
|
||||
|
@ -286,6 +274,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
[fPauseFilterButton setFrame: pauseRect];
|
||||
}
|
||||
|
||||
//set up filter bar
|
||||
NSView * contentView = [fWindow contentView];
|
||||
NSSize windowSize = [contentView convertSize: [fWindow frame].size fromView: nil];
|
||||
[fFilterBar setHidden: YES];
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#import "FileNameCell.h"
|
||||
#import "FileOutlineView.h"
|
||||
#import "Torrent.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
#import "NSStringAdditions.h"
|
||||
|
||||
#define PADDING_HORIZONAL 2.0
|
||||
|
@ -91,7 +92,7 @@
|
|||
|
||||
//title
|
||||
NSColor * specialColor = nil;
|
||||
if ([self isHighlighted]
|
||||
if ([NSApp isOnLeopardOrBetter] ? [self backgroundStyle] == NSBackgroundStyleDark : [self isHighlighted]
|
||||
&& [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]])
|
||||
specialColor = [NSColor whiteColor];
|
||||
else if ([[(FileOutlineView *)[self controlView] torrent] checkForFiles:
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#import "TorrentCell.h"
|
||||
#import "TorrentTableView.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "CTGradientAdditions.h"
|
||||
|
||||
|
@ -223,7 +224,7 @@
|
|||
|
||||
//text color
|
||||
NSColor * titleColor, * statusColor;
|
||||
if ([self isHighlighted]
|
||||
if ([NSApp isOnLeopardOrBetter] ? [self backgroundStyle] == NSBackgroundStyleDark : [self isHighlighted]
|
||||
&& [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]])
|
||||
{
|
||||
titleColor = [NSColor whiteColor];
|
||||
|
|
Loading…
Reference in New Issue