diff options
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r-- | Source/SPQueryController.m | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m index f951e582..891f4fb5 100644 --- a/Source/SPQueryController.m +++ b/Source/SPQueryController.m @@ -153,6 +153,13 @@ static SPQueryController *sharedQueryController = nil; // Set the process table view's vertical gridlines if required [consoleTableView setGridStyleMask:([prefs boolForKey:SPDisplayTableViewVerticalGridlines]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone]; + // Set the strutcture and index view's font + BOOL useMonospacedFont = [prefs boolForKey:SPUseMonospacedFonts]; + + for (NSTableColumn *column in [consoleTableView tableColumns]) + { + [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } } #pragma mark - @@ -395,10 +402,22 @@ static SPQueryController *sharedQueryController = nil; if ([keyPath isEqualToString:SPConsoleEnableLogging]) { [loggingDisabledTextField setStringValue:([[change objectForKey:NSKeyValueChangeNewKey] boolValue]) ? @"" : @"Query logging is currently disabled"]; } - // Show/hide vertical grid lines in console table view + // Display table veiew vertical gridlines preference changed else if ([keyPath isEqualToString:SPDisplayTableViewVerticalGridlines]) { [consoleTableView setGridStyleMask:([[change objectForKey:NSKeyValueChangeNewKey] boolValue]) ? NSTableViewSolidVerticalGridLineMask : NSTableViewGridNone]; } + // Use monospaced fonts preference changed + else if ([keyPath isEqualToString:SPUseMonospacedFonts]) { + + BOOL useMonospacedFont = [[change objectForKey:NSKeyValueChangeNewKey] boolValue]; + + for (NSTableColumn *column in [consoleTableView tableColumns]) + { + [[column dataCell] setFont:(useMonospacedFont) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; + } + + [consoleTableView reloadData]; + } } /** |