File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ struct TerminalEmulatorView: NSViewRepresentable {
3131
3232 private var font : NSFont {
3333 if !prefs. preferences. terminal. font. customFont {
34- return systemFont
34+ return systemFont. withSize ( CGFloat ( prefs . preferences . terminal . font . size ) )
3535 }
3636 return NSFont (
3737 name: prefs. preferences. terminal. font. name,
Original file line number Diff line number Diff line change 88import SwiftUI
99
1010struct ViewCommands : Commands {
11+ @ObservedObject
1112 private var prefs : AppPreferencesModel = . shared
13+
1214 @State var windowController : CodeEditWindowController ?
1315
16+ private let documentController : CodeEditDocumentController = CodeEditDocumentController ( )
17+ private let statusBarViewModel : StatusBarViewModel = StatusBarViewModel ( )
18+
1419 var navigatorCollapsed : Bool {
1520 windowController? . navigatorCollapsed ?? false
1621 }
@@ -26,14 +31,22 @@ struct ViewCommands: Commands {
2631 }
2732 . keyboardShortcut ( " p " , modifiers: [ . shift, . command] )
2833
29- Button ( " Zoom in " ) {
30- prefs. preferences. textEditing. font. size += 1
34+ Button ( " Increase font size " ) {
35+ if CodeEditDocumentController . shared. documents. count > 1 {
36+ prefs. preferences. textEditing. font. size += 1
37+ }
38+ prefs. preferences. terminal. font. size += 1
3139 }
3240 . keyboardShortcut ( " + " )
3341
34- Button ( " Zoom out " ) {
35- if !( prefs. preferences. textEditing. font. size <= 1 ) {
36- prefs. preferences. textEditing. font. size -= 1
42+ Button ( " Decrease font size " ) {
43+ if CodeEditDocumentController . shared. documents. count > 1 {
44+ if !( prefs. preferences. textEditing. font. size <= 1 ) {
45+ prefs. preferences. textEditing. font. size -= 1
46+ }
47+ }
48+ if !( prefs. preferences. terminal. font. size <= 1 ) {
49+ prefs. preferences. terminal. font. size -= 1
3750 }
3851 }
3952 . keyboardShortcut ( " - " )
You can’t perform that action at this time.
0 commit comments