From 3751eb996d4e1495d67036f094b7810f62533282 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 12:32:54 +0200 Subject: fix: adjust the system cards against the screenshots --- widgets/cache.lua | 6 +++--- widgets/system.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'widgets') diff --git a/widgets/cache.lua b/widgets/cache.lua index a1a42e3..0209f1a 100644 --- a/widgets/cache.lua +++ b/widgets/cache.lua @@ -14,8 +14,8 @@ local M = {} function M.draw(cr, rect, colors) local inner = card.card(cr, rect, colors) local function clamp(v, lo, hi) return math.max(lo, math.min(hi, v)) end - local label_size = clamp(inner.w * 0.030, 10, 16) - local big_size = clamp(inner.w * 0.075, 22, 46) + local label_size = clamp(inner.w * 0.036, 10, 16) + local big_size = clamp(inner.w * 0.095, 22, 46) card.font(cr, card.FONT_MONO, label_size, false) card.rgba(cr, colors.label) @@ -36,7 +36,7 @@ function M.draw(cr, rect, colors) card.text(cr, inner.x, inner.y + label_size + big_size, c.total.label) local ey = inner.y + label_size + big_size + label_size * 2 - local step = label_size * 2.2 + local step = label_size * 2.6 card.font(cr, card.FONT_MONO, label_size, false) for i, e in ipairs(c.items) do diff --git a/widgets/system.lua b/widgets/system.lua index c76b5b4..7116302 100644 --- a/widgets/system.lua +++ b/widgets/system.lua @@ -59,7 +59,7 @@ function M.draw(cr, rect, colors) if n > 0 then local gap = math.max(2, inner.w * 0.006) local bw = (inner.w - gap * (n - 1)) / n - local eh = clamp(inner.h * 0.16, 24, 80) + local eh = clamp(inner.h * 0.42, 24, 220) -- Below about 3px a row of sixteen bars is an illegible smear; drop to the -- aggregate bar instead of drawing one. if bw >= 3 then -- cgit v1.2.3