From 43ff74df86e4c58818fd388ea72475cda66ebcaf Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 13:05:39 +0200 Subject: fix: sit the gpu and cache titles level with the big value The 'GPU' and 'CACHE' labels shared the big number's baseline, so they read as sitting under it. Move them to the card's top-left, the same title position the other cards use, level with the top of the value. --- widgets/cache.lua | 4 ++-- widgets/gpu.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'widgets') diff --git a/widgets/cache.lua b/widgets/cache.lua index 40025eb..0aeb016 100644 --- a/widgets/cache.lua +++ b/widgets/cache.lua @@ -30,7 +30,7 @@ function M.draw(cr, rect, colors) }, 100)) card.font(cr, card.FONT_MONO, S * LABEL_F, false) card.rgba(cr, colors.label) - card.text(cr, inner.x, inner.y + S, 'CACHE') + card.text(cr, inner.x, inner.y + S * LABEL_F, 'CACHE') card.font(cr, card.FONT_UI, S * 0.36, true) card.text(cr, inner.x, inner.y + S + S * LABEL_F * 2.6, 'no cache data') card.font(cr, card.FONT_MONO, S * ROW_F, false) @@ -62,7 +62,7 @@ function M.draw(cr, rect, colors) card.font(cr, card.FONT_MONO, label_size, false) card.rgba(cr, colors.label) - card.text(cr, inner.x, inner.y + S, 'CACHE') + card.text(cr, inner.x, inner.y + label_size, 'CACHE') -- The total shares the header line with the label, set on the same baseline -- and right-aligned: the width carries the number instead of an otherwise diff --git a/widgets/gpu.lua b/widgets/gpu.lua index 7933e3b..cd6cc2f 100644 --- a/widgets/gpu.lua +++ b/widgets/gpu.lua @@ -60,7 +60,7 @@ function M.draw(cr, rect, colors) card.font(cr, card.FONT_MONO, label_size, false) card.rgba(cr, colors.label) - card.text(cr, inner.x, y + S, 'GPU') + card.text(cr, inner.x, y + label_size, 'GPU') card.rgba(cr, colors.value) card.text(cr, inner.x, y + S + label_size * 1.7, 'ARC B580') -- cgit v1.2.3