set background color with new prefs method, set foreground color (useless)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38427 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2015-03-22 23:19:16 +00:00
parent 1806cf14dc
commit 7c4cd31b73

View file

@ -281,15 +281,8 @@
if (editable) if (editable)
{ {
NSColor *col; NSColor *col;
NSString *str;
str = [prefs stringForKey:EditorBackgroundColor]; col = [prefs colorForKey:EditorBackgroundColor defaultValue:backgroundColor];
if (str)
{
col = [prefs colorFromString:str];
}
else
col = backgroundColor;
textBackground = col; textBackground = col;
} }
else else
@ -299,6 +292,7 @@
[attributes setObject:font forKey:NSFontAttributeName]; [attributes setObject:font forKey:NSFontAttributeName];
[attributes setObject:textBackground forKey:NSBackgroundColorAttributeName]; [attributes setObject:textBackground forKey:NSBackgroundColorAttributeName];
[attributes setObject:[prefs colorForKey:EditorForegroundColor defaultValue:textColor] forKey:NSForegroundColorAttributeName];
text = [NSString stringWithContentsOfFile:_path]; text = [NSString stringWithContentsOfFile:_path];
attributedString = [attributedString initWithString:text attributes:attributes]; attributedString = [attributedString initWithString:text attributes:attributes];