aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPServerVariablesController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPServerVariablesController.m')
-rw-r--r--Source/SPServerVariablesController.m14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/SPServerVariablesController.m b/Source/SPServerVariablesController.m
index 7e66ff0c..a2e1e059 100644
--- a/Source/SPServerVariablesController.m
+++ b/Source/SPServerVariablesController.m
@@ -60,17 +60,18 @@
- (void)awakeFromNib
{
- NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
+ prefs = [NSUserDefaults standardUserDefaults];
// Set the process table view's vertical gridlines if required
[variablesTableView setGridStyleMask:([prefs boolForKey:SPDisplayTableViewVerticalGridlines]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone];
// Set the strutcture and index view's font
BOOL useMonospacedFont = [prefs boolForKey:SPUseMonospacedFonts];
-
+ CGFloat monospacedFontSize = [prefs floatForKey:SPMonospacedFontSize] > 0 ? [prefs floatForKey:SPMonospacedFontSize] : [NSFont smallSystemFontSize];
+
for (NSTableColumn *column in [variablesTableView tableColumns])
{
- [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[column dataCell] setFont:useMonospacedFont ? [NSFont fontWithName:SPDefaultMonospacedFontName size:monospacedFontSize] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
}
// Register as an observer for the when the UseMonospacedFonts preference changes
@@ -216,10 +217,11 @@
else if ([keyPath isEqualToString:SPUseMonospacedFonts]) {
BOOL useMonospacedFont = [[change objectForKey:NSKeyValueChangeNewKey] boolValue];
-
+ CGFloat monospacedFontSize = [prefs floatForKey:SPMonospacedFontSize] > 0 ? [prefs floatForKey:SPMonospacedFontSize] : [NSFont smallSystemFontSize];
+
for (NSTableColumn *column in [variablesTableView tableColumns])
{
- [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
+ [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:monospacedFontSize] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
}
[variablesTableView reloadData];
@@ -377,7 +379,7 @@
- (void)dealloc
{
- [[NSUserDefaults standardUserDefaults] removeObserver:self forKeyPath:SPUseMonospacedFonts];
+ [prefs removeObserver:self forKeyPath:SPUseMonospacedFonts];
[variables release], variables = nil;