Add leuchtturm theme, font zoom, syntax palette fixes

Themes:
- Add leuchtturm theme (fountain pen ink on cream paper, brass/leather dark)
- Add per-theme syntax palettes for leuchtturm, tufte, and everforest
- Fix static inline globals giving each TU its own copy of gCurrentTheme
  and gBackgroundMode (changed to inline for proper C++17 linkage)
- :background with no args now shows current mode

Font zoom:
- CMD-=/CMD--/CMD-0 to increase/decrease/reset font size

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-24 21:17:55 -07:00
parent 3148e16cf8
commit 8712ea673d
7 changed files with 408 additions and 22 deletions

View File

@@ -349,6 +349,26 @@ ImGuiInputHandler::ProcessSDLEvent(const SDL_Event &e)
}
}
// Font zoom: Cmd+=/Cmd+-/Cmd+0 (macOS) or Ctrl+=/Ctrl+-/Ctrl+0
if ((mods & (KMOD_CTRL | KMOD_GUI)) && !(mods & KMOD_SHIFT)) {
bool is_zoom = true;
CommandId zoom_cmd = CommandId::FontZoomIn;
if (key == SDLK_EQUALS || key == SDLK_PLUS)
zoom_cmd = CommandId::FontZoomIn;
else if (key == SDLK_MINUS)
zoom_cmd = CommandId::FontZoomOut;
else if (key == SDLK_0)
zoom_cmd = CommandId::FontZoomReset;
else
is_zoom = false;
if (is_zoom) {
std::lock_guard<std::mutex> lk(mu_);
q_.push(MappedInput{true, zoom_cmd, std::string(), 0});
suppress_text_input_once_ = true;
return true;
}
}
// Handle Paste: Ctrl+V (Windows/Linux) or Cmd+V (macOS)
// Note: SDL defines letter keycodes in lowercase only (e.g., SDLK_v). Shift does not change keycode.
if ((mods & (KMOD_CTRL | KMOD_GUI)) && (key == SDLK_v)) {