diff --git a/bin/xsecurelock-saver b/bin/xsecurelock-saver index 915184a..1100205 100755 --- a/bin/xsecurelock-saver +++ b/bin/xsecurelock-saver @@ -69,16 +69,15 @@ def on_win_draw(widget, cctx, ctx): def on_overlay_draw(widget, cctx, ctx): """Draw overlay (clock and weather).""" wwidth, wheight = widget.get_parent().get_size() - cctx.set_source_rgb(1, 1, 1) + cctx.set_operator(cairo.OPERATOR_OVER) - def draw(what, outline=2): - position = cctx.get_current_point() - cctx.set_operator(cairo.OPERATOR_EXCLUSION) - cctx.set_line_width(outline) - cctx.text_path(what) - cctx.stroke() - cctx.move_to(*position) - cctx.set_operator(cairo.OPERATOR_SOURCE) + def draw(what): + x, y = cctx.get_current_point() + cctx.set_source_rgba(0, 0, 0, 0.3) + cctx.move_to(x+2, y+2) + cctx.show_text(what) + cctx.set_source_rgb(1, 1, 1) + cctx.move_to(x, y) cctx.show_text(what) # Clock @@ -92,7 +91,7 @@ def on_overlay_draw(widget, cctx, ctx): cctx.set_font_size(ctx.clock_font_size) _, _, twidth, theight, _, _ = cctx.text_extents(re.sub(r"\d", "8", time)) cctx.move_to(wwidth // 2 - twidth // 2, wheight // 3) - draw(time, 4) + draw(time) # Date cctx.select_font_face(