From 72fa4d3135d60908f88df6ad2f14771cfcbccb11 Mon Sep 17 00:00:00 2001 From: Calic Date: Thu, 11 Jun 2026 02:15:47 +0200 Subject: [PATCH] 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. --- panels/detail.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/panels/detail.lua b/panels/detail.lua index 564e777..be46fba 100644 --- a/panels/detail.lua +++ b/panels/detail.lua @@ -94,11 +94,16 @@ function M.render(ctx) cur_y = cur_y + 24 if r and r.deps then + local GUTTER_W = 48 -- room for "WARN" + breathing space for _, d in ipairs(r.deps) do 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), - 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 end end