aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPEditorPreferencePane.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-10-14 22:29:37 +0000
committerrowanbeentje <rowan@beent.je>2012-10-14 22:29:37 +0000
commitd45a1e1b6f08f49f92bdc61159d8dd252fc8156f (patch)
tree6dfbbec6b32fc4a55d548a012c2f8d4c4393228a /Source/SPEditorPreferencePane.m
parent5aa4c866a68098c65cc8268621da0cbdc2725986 (diff)
downloadsequelpro-d45a1e1b6f08f49f92bdc61159d8dd252fc8156f.tar.gz
sequelpro-d45a1e1b6f08f49f92bdc61159d8dd252fc8156f.tar.bz2
sequelpro-d45a1e1b6f08f49f92bdc61159d8dd252fc8156f.zip
Query Editor Preference Pane editor colour tweaks:
- Make the preview colour well square - Make the background colour apply to the full preview table and not just the cell backgrounds
Diffstat (limited to 'Source/SPEditorPreferencePane.m')
-rw-r--r--Source/SPEditorPreferencePane.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m
index a96bc1b9..697c4495 100644
--- a/Source/SPEditorPreferencePane.m
+++ b/Source/SPEditorPreferencePane.m
@@ -124,6 +124,8 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined";
[colorCell setAction:@selector(colorClick:)];
[column setDataCell:colorCell];
+
+ [colorSettingTableView setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
}
#pragma mark -
@@ -297,7 +299,8 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined";
[prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorTextColor];
[prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor blackColor]] forKey:SPCustomQueryEditorCaretColor];
[prefs setObject:[NSArchiver archivedDataWithRootObject:[NSColor whiteColor]] forKey:SPCustomQueryEditorBackgroundColor];
-
+
+ [colorSettingTableView setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
[colorSettingTableView reloadData];
[self updateDisplayColorThemeName];
@@ -467,8 +470,13 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined";
if (![[NSColorPanel sharedColorPanel] isVisible]) return;
[prefs setObject:[NSArchiver archivedDataWithRootObject:[sender color]] forKey:[editorColors objectAtIndex:colorRow]];
+
+ if ([[editorColors objectAtIndex:colorRow] isEqualTo:SPCustomQueryEditorBackgroundColor]) {
+ [colorSettingTableView setBackgroundColor:[sender color]];
+ }
+
[colorSettingTableView reloadData];
-
+
[prefs setObject:SPCustomColorSchemeName forKey:SPCustomQueryEditorThemeName];
[self updateDisplayColorThemeName];
@@ -1004,6 +1012,7 @@ static NSString *SPCustomColorSchemeNameLC = @"user-defined";
}
[theme release];
+ [colorSettingTableView setBackgroundColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorBackgroundColor]]];
[colorSettingTableView reloadData];
}
else {