aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPBundleCommandTextView.m10
-rw-r--r--Source/SPBundleHTMLOutputController.m5
-rw-r--r--Source/SPEditSheetTextView.m6
-rw-r--r--Source/SPTextViewAdditions.h1
-rw-r--r--Source/SPTextViewAdditions.m12
5 files changed, 32 insertions, 2 deletions
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m
index 59bebadc..6f91676c 100644
--- a/Source/SPBundleCommandTextView.m
+++ b/Source/SPBundleCommandTextView.m
@@ -488,7 +488,13 @@
[self saveChangedFontInUserDefaults];
return;
}
- if([charactersIgnMod isEqualToString:@"["]) // decrease text size by 1; ⌘- and numpad -
+ if([charactersIgnMod isEqualToString:@"0"]) // return text to standard size; ⌘0
+ {
+ [self makeTextStandardSize];
+ [self saveChangedFontInUserDefaults];
+ return;
+ }
+ if([charactersIgnMod isEqualToString:@"["]) // shift left
{
[self shiftSelectionLeft];
return;
@@ -498,7 +504,7 @@
[self shiftSelectionRight];
return;
}
- if([charactersIgnMod isEqualToString:@"/"]) // shift right
+ if([charactersIgnMod isEqualToString:@"/"]) // comment out text
{
[self commentOut];
return;
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 1995cfcb..e49cce11 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -145,6 +145,11 @@
[webView makeTextSmaller:nil];
return;
}
+ if([charactersIgnMod isEqualToString:@"0"]) // return the text size to the default size
+ {
+ [webView makeTextStandardSize:nil];
+ return;
+ }
if([theEvent keyCode] == 123) // goBack
{
if([webView canGoBack])
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m
index 7a4fb37c..b028c177 100644
--- a/Source/SPEditSheetTextView.m
+++ b/Source/SPEditSheetTextView.m
@@ -125,6 +125,12 @@
[self saveChangedFontInUserDefaults];
return;
}
+ if([charactersIgnMod isEqualToString:@"0"]) // return the text size to the default size; ⌘0
+ {
+ [self makeTextStandardSize];
+ [self saveChangedFontInUserDefaults];
+ return;
+ }
}
// Allow undo grouping if user typed a ' ' (for word level undo)
diff --git a/Source/SPTextViewAdditions.h b/Source/SPTextViewAdditions.h
index 013d8872..9553be4d 100644
--- a/Source/SPTextViewAdditions.h
+++ b/Source/SPTextViewAdditions.h
@@ -46,5 +46,6 @@
- (void)makeTextSizeLarger;
- (void)makeTextSizeSmaller;
+- (void)makeTextStandardSize;
@end
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 0d3b4b8e..b0e87f3d 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -482,6 +482,18 @@
[self setEditable:editableStatus];
}
+/**
+ * Increase the textView's font size by 1
+ */
+- (void)makeTextStandardSize
+{
+ NSFont *aFont = [self font];
+ BOOL editableStatus = [self isEditable];
+ [self setEditable:YES];
+ [self setFont:[[NSFontManager sharedFontManager] convertFont:aFont toSize:11.0f]];
+ [self setEditable:editableStatus];
+}
+
- (IBAction)executeBundleItemForInputField:(id)sender
{