Source

//// BWTransparentTextFieldCell.m// BWToolkit//// Created by Brandon Walkin (www.brandonwalkin.com)// All code is provided under the New BSD license.//#import "BWTransparentTextFieldCell.h"#import "NSApplication+BWAdditions.h"staticNSShadow*textShadow;@interfaceNSCell(BWTTFCPrivate)-(NSDictionary*)_textAttributes;@end@implementationBWTransparentTextFieldCell+(void)initialize{textShadow=[[NSShadowalloc]init];[textShadowsetShadowOffset:NSMakeSize(0,-1)];}-(NSDictionary*)_textAttributes{NSMutableDictionary*attributes=[[[NSMutableDictionaryalloc]init]autorelease];[attributesaddEntriesFromDictionary:[super_textAttributes]];[attributessetObject:[NSColorwhiteColor]forKey:NSForegroundColorAttributeName];if([NSApplicationbwIsOnLeopard])[attributessetObject:[NSFontboldSystemFontOfSize:11]forKey:NSFontAttributeName];else[attributessetObject:[NSFontsystemFontOfSize:11]forKey:NSFontAttributeName];[attributessetObject:textShadowforKey:NSShadowAttributeName];returnattributes;}@end