aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
authordmoagx <post@wickenrode.com>2012-03-16 20:19:17 +0000
committerdmoagx <post@wickenrode.com>2012-03-16 20:19:17 +0000
commit8886d935e933c6239aa9b35e900d96f7d07527c7 (patch)
tree20093287366272e0e7b234f863e69e5a236a8f00 /Source/SPTextView.m
parentab3d4cc4fcc42283cebc1062729512d85e9db620 (diff)
downloadsequelpro-8886d935e933c6239aa9b35e900d96f7d07527c7.tar.gz
sequelpro-8886d935e933c6239aa9b35e900d96f7d07527c7.tar.bz2
sequelpro-8886d935e933c6239aa9b35e900d96f7d07527c7.zip
* Moves the background color code for SPTextView into the class. Fixes #1073
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index 500e4892..6611d6f8 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -180,7 +180,9 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
#ifndef SP_REFACTOR
[self setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]];
- [self setQueryEditorBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
+ NSColor *backgroundColor = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]];
+ [self setQueryEditorBackgroundColor:backgroundColor];
+ [self setBackgroundColor:backgroundColor];
[self setCommentColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorCommentColor]]];
[self setQuoteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorQuoteColor]]];
[self setKeywordColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorSQLKeywordColor]]];
@@ -240,7 +242,9 @@ NSInteger _alphabeticSort(id string1, id string2, void *reverse)
{
#ifndef SP_REFACTOR
if ([keyPath isEqualToString:SPCustomQueryEditorBackgroundColor]) {
- [self setQueryEditorBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];
+ NSColor *backgroundColor = [NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]];
+ [self setQueryEditorBackgroundColor:backgroundColor];
+ [self setBackgroundColor:backgroundColor];
[self setNeedsDisplayInRect:[self bounds]];
} else if ([keyPath isEqualToString:SPCustomQueryEditorFont]) {
[self setFont:[NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]];