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

@@ -527,6 +527,21 @@ GUIFrontend::Step(Editor &ed, bool &running)
if (mi.id == CommandId::NewWindow) {
// Open a new window; handled after this loop
wed.SetNewWindowRequested(true);
} else if (mi.id == CommandId::FontZoomIn ||
mi.id == CommandId::FontZoomOut ||
mi.id == CommandId::FontZoomReset) {
auto &fr = kte::Fonts::FontRegistry::Instance();
float cur = fr.CurrentFontSize();
if (cur <= 0.0f) cur = config_.font_size;
float next = cur;
if (mi.id == CommandId::FontZoomIn)
next = std::min(cur + 2.0f, 72.0f);
else if (mi.id == CommandId::FontZoomOut)
next = std::max(cur - 2.0f, 8.0f);
else
next = config_.font_size; // reset to config default
if (next != cur)
fr.RequestLoadFont(fr.CurrentFontName(), next);
} else {
const std::string before = wed.KillRingHead();
Execute(wed, mi.id, mi.arg, mi.count);