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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user