diff options
Diffstat (limited to 'widgets/breaktimer.lua')
| -rw-r--r-- | widgets/breaktimer.lua | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/widgets/breaktimer.lua b/widgets/breaktimer.lua index 698be80..e6487b8 100644 --- a/widgets/breaktimer.lua +++ b/widgets/breaktimer.lua @@ -21,7 +21,7 @@ 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_F, BIG_F, ROW_F = 0.30, 0.85, 0.32 + local LABEL_F, BIG_F, ROW_F = 0.30, 1.0, 0.32 local bt = data.breaktimer_parse(data.slurp(CACHE) or '') @@ -30,19 +30,7 @@ function M.draw(cr, rect, colors) -- crash. A stopped daemon is NOT this case: the sampler still writes a cache, -- with running no, which the card draws as 'fermo'. if not bt then - local S = clamp(inner.h * 0.94 / (1.78 + 2 * 0.72), 10, 72) - S = math.min(S, card.fit_unit(cr, inner.w * 0.96, { - { { 'BREAKTIMER', card.FONT_MONO, LABEL_F } }, - { { 'no breaktimer data', card.FONT_UI, 0.36 } }, - { { 'bin/breaktimer-sample.sh', card.FONT_MONO, ROW_F } }, - }, 100)) - card.font(cr, card.FONT_MONO, S * LABEL_F, false) - card.rgba(cr, colors.label) - card.text(cr, inner.x, inner.y + S * LABEL_F, 'BREAKTIMER') - card.font(cr, card.FONT_UI, S * 0.36, true) - card.text(cr, inner.x, inner.y + S + S * LABEL_F * 2.6, 'no breaktimer data') - card.font(cr, card.FONT_MONO, S * ROW_F, false) - card.text(cr, inner.x, inner.y + S + S * LABEL_F * 2.6 + S * 0.72, + card.notice(cr, inner, colors, 'BREAKTIMER', 'no breaktimer data', 'bin/breaktimer-sample.sh') return end |
