From 734c2ac8383bc6afe45796b416cb7c70a090d569 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 15:07:55 +0200 Subject: feat(now): the condition glyph stands in for the title, large card.standard() without a title draws the icon alone at the big value's size, the glyph-for-title case DESIGN.md already allows. The now card uses it and drops the bottom glyph. Co-Authored-By: Claude Opus 5.5 --- widgets/now.lua | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'widgets') diff --git a/widgets/now.lua b/widgets/now.lua index f00c46e..03a9ecc 100644 --- a/widgets/now.lua +++ b/widgets/now.lua @@ -26,21 +26,11 @@ function M.draw(cr, rect, colors) { 'UPDATED', weather.age_str(c.dt, now), weather.is_stale(c.dt, now) and colors.warning or nil }, } - local y, S = card.standard(cr, inner, colors, { - icon = weather.icon(c.code, c.is_day), title = 'WEATHER', + -- No title: the condition glyph stands in for it, at the big value's size. + card.standard(cr, inner, colors, { + icon = weather.icon(c.code, c.is_day), big = weather.deg(c.temp), rows = rows, share = 0.85, }) - - -- The condition as a large glyph, the card's variable band: the type is - -- capped to match the other cards, so a tall cell leaves height over, and the - -- glyph takes it. Dropped when there is no room for one bigger than a row. - local size = math.min(inner.y + inner.h - y, inner.w * 0.45) - if size > S * 0.6 then - card.font(cr, card.FONT_MONO, size, false) - card.rgba(cr, colors.highlight) - card.text_centre(cr, inner.x + inner.w / 2, inner.y + inner.h - size * 0.15, - weather.icon(c.code, c.is_day)) - end end return M -- cgit v1.2.3