From b4451efb0f957d3cd3d9750f903899d8a87e15f3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sun, 18 Oct 2026 14:45:35 +0200 Subject: fix(weather cards): review fixes Hour and day labels go through weather.clock, hourly clamps rain chance and caps at 24 hours, week widens the scale by min and max together and sizes the glyph apart from the text, details compass letters never exceed row text, now always hints at the fetcher. Co-Authored-By: Claude Sonnet 5.5 --- widgets/sky.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'widgets/sky.lua') diff --git a/widgets/sky.lua b/widgets/sky.lua index aa0ad43..7dbc399 100644 --- a/widgets/sky.lua +++ b/widgets/sky.lua @@ -38,7 +38,7 @@ local function draw_arc(cr, x, y, w, h, colors, rise, set, now) cairo_curve_to(cr, c1[1], c1[2], c2[1], c2[2], p3[1], p3[2]) cairo_stroke(cr) - local t = weather.sun_t(now, rise, set) or 0 + local t = weather.sun_t(now, rise, set) local function bez(a, b, c, d) local u = 1 - t return u * u * u * a + 3 * u * u * t * b + 3 * u * t * t * c + t * t * t * d @@ -64,8 +64,8 @@ function M.draw(cr, rect, colors) local rise, set = w.sun.rise, w.sun.set local phase, lit = weather.moon(now) local rows = { - { 'SUNRISE', os.date('%H:%M', rise) }, - { 'SUNSET', os.date('%H:%M', set) }, + { 'SUNRISE', weather.clock(rise) }, + { 'SUNSET', weather.clock(set) }, { 'DAYLIGHT', weather.duration(set - rise) }, { 'MOON', weather.num(lit * 100, '%') }, } -- cgit v1.2.3