xss-dimmer: add an outline on countdown timer

This commit is contained in:
Vincent Bernat 2021-09-06 14:15:15 +02:00
parent 1bf02421ea
commit 432149fd91

View file

@ -68,6 +68,11 @@ def on_draw(widget, event, options, elapsed):
_, _, twidth, theight, _, _ = cctx.text_extents(remaining)
cctx.move_to(wwidth // 2 - twidth // 2, wheight // 2 + theight // 2)
cctx.show_text(remaining)
cctx.set_source_rgba(0, 0, 0, opacity*2)
cctx.move_to(wwidth // 2 - twidth // 2, wheight // 2 + theight // 2)
cctx.text_path(remaining)
cctx.set_line_width(4)
cctx.stroke()
# Rearm timer
if not once: