From 2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 15:16:05 +0200 Subject: feat(details): air under the compass, no empty strip under the rows The compass goes back to the big slot's own size, leaving a gap above the WIND row. card.standard()'s height budget reserved about a fifth more than the header and rows draw; it now matches what is drawn plus a little air, which changes nothing on a card already at the size cap (compared pixel for pixel) and lets details drop to 3.75 rows at full type. sky moves up to take the space. Co-Authored-By: Claude Opus 5.5 --- lib/card.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/card.lua b/lib/card.lua index 4163aae..3dd4b12 100644 --- a/lib/card.lua +++ b/lib/card.lua @@ -348,10 +348,13 @@ function M.standard(cr, inner, colors, spec) groups[#groups + 1] = { { r[1], M.FONT_MONO, ROW_F }, { r[2] == nil and '--' or tostring(r[2]), M.FONT_MONO, ROW_F } } end - -- Height in units of S: the header line, the gap under it, a step per row. + -- Height in units of S: the header line, a little air, a 0.64 step per row + -- (the first row's baseline sits 0.512 under the header, the last row's + -- descent takes about 0.1, so this leaves a few percent of slack and no + -- empty strip under the rows). local head_f = (big or not spec.title) and BIG_F or LABEL_F * 1.2 local budget = inner.h * (spec.share or 1) - local S = clamp(math.min(budget * 0.94 / (head_f + 0.5 + #rows * 0.66), + local S = clamp(math.min(budget / (head_f + 0.2 + #rows * 0.64), M.fit_unit(cr, inner.w * 0.96, groups, 100)), 10, 72) local label_size, row_size = S * LABEL_F, S * ROW_F -- cgit v1.2.3