Revision: 15217
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15217&view=rev
Author: hofman
Date: 2009-04-28 13:17:52 +0000 (Tue, 28 Apr 2009)
Log Message:
-----------
Explicitly use white text color on Tiger in text cell subclasses that override
their highlight color, because otherwise Tiger's implementation won't invert
the text color for selected cells.
Modified Paths:
--------------
trunk/bibdesk/BDSKGradientTableView.m
trunk/bibdesk/BDSKIconTextFieldCell.m
trunk/bibdesk/BDSKMainTableView.m
Modified: trunk/bibdesk/BDSKGradientTableView.m
===================================================================
--- trunk/bibdesk/BDSKGradientTableView.m 2009-04-28 11:19:52 UTC (rev
15216)
+++ trunk/bibdesk/BDSKGradientTableView.m 2009-04-28 13:17:52 UTC (rev
15217)
@@ -139,8 +139,6 @@
return self;
}
-- (id)_highlightColorForCell:(NSCell *)cell { return nil; }
-
- (void)highlightSelectionInClipRect:(NSRect)rect {
if ([self respondsToSelector:@selector(setSelectionHighlightStyle:)]) {
[super highlightSelectionInClipRect:rect];
@@ -235,8 +233,6 @@
return self;
}
-- (id)_highlightColorForCell:(NSCell *)cell { return nil; }
-
- (void)highlightSelectionInClipRect:(NSRect)rect {
if ([self respondsToSelector:@selector(setSelectionHighlightStyle:)]) {
[super highlightSelectionInClipRect:rect];
Modified: trunk/bibdesk/BDSKIconTextFieldCell.m
===================================================================
--- trunk/bibdesk/BDSKIconTextFieldCell.m 2009-04-28 11:19:52 UTC (rev
15216)
+++ trunk/bibdesk/BDSKIconTextFieldCell.m 2009-04-28 13:17:52 UTC (rev
15217)
@@ -48,6 +48,14 @@
return nil;
}
+// Tiger inverts the text color based on the highlight color, which is lame
+- (NSColor *)textColor {
+ if ([self respondsToSelector:@selector(backgroundStyle)] == NO &&
+ [[[self controlView] window] isKeyWindow] && [[self controlView]
firstResponder] == [self controlView])
+ return [NSColor textBackgroundColor];
+ return [super textColor];
+}
+
#define BORDER_BETWEEN_EDGE_AND_IMAGE_BORDERLESS (1.0)
#define BORDER_BETWEEN_IMAGE_AND_TEXT_BORDERLESS (0.0)
#define BORDER_BETWEEN_EDGE_AND_IMAGE_BORDERED (2.0)
Modified: trunk/bibdesk/BDSKMainTableView.m
===================================================================
--- trunk/bibdesk/BDSKMainTableView.m 2009-04-28 11:19:52 UTC (rev 15216)
+++ trunk/bibdesk/BDSKMainTableView.m 2009-04-28 13:17:52 UTC (rev 15217)
@@ -732,6 +732,14 @@
return nil;
}
+// Tiger inverts the text color based on the highlight color, which is lame
+- (NSColor *)textColor {
+ if ([self respondsToSelector:@selector(backgroundStyle)] == NO &&
+ [[[self controlView] window] isKeyWindow] && [[self controlView]
firstResponder] == [self controlView])
+ return [NSColor textBackgroundColor];
+ return [super textColor];
+}
+
@end
#pragma mark -
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit