fix(launcher): right-align dep-status glyph in fixed gutter

ASCII fallback glyphs ('OK', 'WARN', 'ERR') have variable width; the
previous 40px column gap was too narrow for 'WARN', causing the id
column to wobble between modules. Widens the gutter to 48px and
right-aligns the glyph inside it so the id text always starts at a
predictable x.
This commit is contained in:
Calic
2026-06-11 02:15:47 +02:00
parent 0a96b009f1
commit 72fa4d3135

View File

@@ -94,11 +94,16 @@ function M.render(ctx)
cur_y = cur_y + 24 cur_y = cur_y + 24
if r and r.deps then if r and r.deps then
local GUTTER_W = 48 -- room for "WARN" + breathing space
for _, d in ipairs(r.deps) do for _, d in ipairs(r.deps) do
local glyph, col = status_glyph(d.status) local glyph, col = status_glyph(d.status)
engine.render.draw_text(glyph, p.x + PADDING, cur_y, FONT_DEP, col) local gw, _ = engine.render.measure_text(glyph, FONT_DEP)
engine.render.draw_text(glyph,
p.x + PADDING + GUTTER_W - gw, -- right-align in gutter
cur_y, FONT_DEP, col)
engine.render.draw_text(string.format("%s %s", d.id, d.version), engine.render.draw_text(string.format("%s %s", d.id, d.version),
p.x + PADDING + 40, cur_y, FONT_DEP, COLOR_TEXT) p.x + PADDING + GUTTER_W + 8, -- id starts after gutter + 8px pad
cur_y, FONT_DEP, COLOR_TEXT)
cur_y = cur_y + 20 cur_y = cur_y + 20
end end
end end