Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions TablePro/TableProApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,18 @@ struct AppMenuCommands: Commands {
}
.optionalKeyboardShortcut(shortcut(for: .closeResultTab))
.disabled(!appState.isConnected)

Divider()

Button("Zoom In") {
ThemeEngine.shared.adjustEditorFontSize(by: 1)
}
.keyboardShortcut("=", modifiers: .command)

Button("Zoom Out") {
ThemeEngine.shared.adjustEditorFontSize(by: -1)
}
.keyboardShortcut("-", modifiers: .command)
}

// Tab navigation shortcuts — native macOS window tabs
Expand Down
12 changes: 12 additions & 0 deletions TablePro/Theme/ThemeEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@ internal final class ThemeEngine {
availableThemes = ThemeStorage.loadAllThemes()
}

// MARK: - Editor Font Size Zoom

func adjustEditorFontSize(by delta: Int) {
var theme = activeTheme
let newSize = max(9, min(24, theme.fonts.editorFontSize + delta))
guard newSize != theme.fonts.editorFontSize else { return }
theme.fonts.editorFontSize = newSize
activeTheme = theme
editorFonts = EditorFontCache(from: theme.fonts)
notifyThemeDidChange()
}

// MARK: - Font Cache Reload (accessibility)

func reloadFontCaches() {
Expand Down
7 changes: 7 additions & 0 deletions docs/features/keyboard-shortcuts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ TablePro is keyboard-driven. Most actions have shortcuts, and most menu shortcut
| Next Result | `Cmd+Opt+]` |
| Close Result Tab | `Cmd+Shift+W` |

### Editor Zoom

| Action | Shortcut |
|--------|----------|
| Zoom In | `Cmd+=` |
| Zoom Out | `Cmd+-` |

### AI

| Action | Shortcut | Description |
Expand Down
Loading