From: <ho...@us...> - 2009-05-06 13:56:43
|
Revision: 15276 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15276&view=rev Author: hofman Date: 2009-05-06 13:39:59 +0000 (Wed, 06 May 2009) Log Message: ----------- only use textfield subclass for parent groups on Tiger Modified Paths: -------------- trunk/bibdesk/BDSKGroupOutlineView.m Modified: trunk/bibdesk/BDSKGroupOutlineView.m =================================================================== --- trunk/bibdesk/BDSKGroupOutlineView.m 2009-05-06 11:07:09 UTC (rev 15275) +++ trunk/bibdesk/BDSKGroupOutlineView.m 2009-05-06 13:39:59 UTC (rev 15276) @@ -88,8 +88,12 @@ - (NSTextFieldCell *)parentCell { if (parentCell == nil) { - parentCell = [[BDSKParentGroupCell alloc] init]; - [parentCell setTextColor:[NSColor disabledControlTextColor]]; + if ([self respondsToSelector:@selector(setSelectionHighlightStyle:)]) { + parentCell = [[NSTextFieldCell alloc] init]; + } else { + parentCell = [[BDSKParentGroupCell alloc] init]; + [parentCell setTextColor:[NSColor disabledControlTextColor]]; + } [parentCell setFont:[[NSFontManager sharedFontManager] convertFont:[self font] toHaveTrait:NSBoldFontMask]]; } return parentCell; @@ -276,10 +280,8 @@ @implementation BDSKParentGroupCell - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { - if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_4) { - NSRect ignored; - NSDivideRect(cellFrame, &ignored, &cellFrame, 3.0, NSMinYEdge); - } + NSRect ignored; + NSDivideRect(cellFrame, &ignored, &cellFrame, 3.0, NSMinYEdge); [super drawInteriorWithFrame:cellFrame inView:controlView]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |