diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-18 15:16:05 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-18 15:16:05 +0200 |
| commit | 2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca (patch) | |
| tree | 5f188929e331ff4d65349a7da9934ebbb160fc42 /lib/card.lua | |
| parent | 1ed34aa44879296eef34bb0509e8b96533217f15 (diff) | |
| download | conky-theme-udt-2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca.tar.gz conky-theme-udt-2081aa8dbc2e2b8aaec0aade6f74aa61ffc3bbca.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'lib/card.lua')
| -rw-r--r-- | lib/card.lua | 7 |
1 files changed, 5 insertions, 2 deletions
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 |
