diff options
Diffstat (limited to 'widgets/now.lua')
| -rw-r--r-- | widgets/now.lua | 16 |
1 files changed, 3 insertions, 13 deletions
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 |
