Revision: 15221
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15221&view=rev
Author: hofman
Date: 2009-04-28 15:15:26 +0000 (Tue, 28 Apr 2009)
Log Message:
-----------
move highlight and text color overrides from BDSKIconTextFieldCell to
BDSKTextWithIconCell, because that's the where we actually use it
Modified Paths:
--------------
trunk/bibdesk/BDSKIconTextFieldCell.m
trunk/bibdesk/BDSKTextWithIconCell.m
Modified: trunk/bibdesk/BDSKIconTextFieldCell.m
===================================================================
--- trunk/bibdesk/BDSKIconTextFieldCell.m 2009-04-28 15:14:11 UTC (rev
15220)
+++ trunk/bibdesk/BDSKIconTextFieldCell.m 2009-04-28 15:15:26 UTC (rev
15221)
@@ -44,18 +44,6 @@
@implementation BDSKIconTextFieldCell
-- (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView
*)controlView {
- 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]
window] 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/BDSKTextWithIconCell.m
===================================================================
--- trunk/bibdesk/BDSKTextWithIconCell.m 2009-04-28 15:14:11 UTC (rev
15220)
+++ trunk/bibdesk/BDSKTextWithIconCell.m 2009-04-28 15:15:26 UTC (rev
15221)
@@ -85,27 +85,28 @@
return copy;
}
+- (NSColor *)highlightColorWithFrame:(NSRect)cellFrame inView:(NSView
*)controlView {
+ return nil;
+}
+
- (NSColor *)textColor {
- NSColor *color = nil;
-
// this allows the expansion tooltips on 10.5 to draw with the correct
color
#if defined(MAC_OS_X_VERSION_10_5) && MAC_OS_X_VERSION_MIN_REQUIRED >=
MAC_OS_X_VERSION_10_5
// on 10.5, we can just check background style instead of messing around
with flags and checking the highlight color, which accounts for much of the
code in this class
#warning 10.5 fixme
#endif
- if ([self respondsToSelector:@selector(backgroundStyle)]) {
- NSBackgroundStyle style = [self backgroundStyle];
- if (NSBackgroundStyleLight == style)
- return (hasDarkHighlight && [self isHighlighted]) ? [NSColor
textBackgroundColor] : [NSColor blackColor];
+
+ if (settingUpFieldEditor == NO) {
+ if ([self respondsToSelector:@selector(backgroundStyle)]) {
+ if (hasDarkHighlight && [self isHighlighted])
+ return [NSColor textBackgroundColor];
+ } else {
+ if ((hasDarkHighlight && [self isHighlighted]) ||
+ ([[[self controlView] window] isKeyWindow] && [[[self
controlView] window] firstResponder] == [self controlView]))
+ return [NSColor textBackgroundColor];
+ }
}
-
- if (settingUpFieldEditor)
- color = [NSColor blackColor];
- else if (hasDarkHighlight && [self isHighlighted])
- color = [NSColor textBackgroundColor];
- else
- color = [super textColor];
- return color;
+ return [super textColor];
}
- (void)editWithFrame:(NSRect)aRect inView:(NSView *)controlView
editor:(NSText *)textObj delegate:(id)anObject event:(NSEvent *)theEvent {
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