From 5b1ca8a7f9f11444595fa1985d2c9110d24c0de9 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 2 Aug 2010 12:06:06 -0400 Subject: [PATCH] Fix for issue #807 (NSTextField sets text color unconditionally, which causes theme lookup failure later) --- Tools/nib2cib/NSTextField.j | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/nib2cib/NSTextField.j b/Tools/nib2cib/NSTextField.j index d9d935085..1368ea40e 100644 --- a/Tools/nib2cib/NSTextField.j +++ b/Tools/nib2cib/NSTextField.j @@ -54,7 +54,12 @@ [self setPlaceholderString:[cell placeholderString]]; - [self setTextColor:[cell textColor]]; + var textColor = [cell textColor], + defaultColor = [self currentValueForThemeAttribute:@"text-color"]; + + // Don't change the text color if it is not the default, that messes up the theme lookups later + if (![textColor isEqual:defaultColor]) + [self setTextColor:[cell textColor]]; var frame = [self frame];