From de2c9879bc360e2b07ce78271070d2700c8b3a99 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 13 Dec 2021 21:07:00 +0100 Subject: [PATCH] xsecurelock: don't use bold for date --- bin/xsecurelock-saver | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/xsecurelock-saver b/bin/xsecurelock-saver index fd866ff..4721727 100755 --- a/bin/xsecurelock-saver +++ b/bin/xsecurelock-saver @@ -69,9 +69,6 @@ def on_overlay_draw(widget, cctx, ctx): wwidth, wheight = widget.get_parent().get_size() if ctx.clock: time, date = ctx.clock - cctx.select_font_face( - ctx.font_family, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD - ) def draw(what, outline): cctx.move_to(*text_position) @@ -79,12 +76,18 @@ def on_overlay_draw(widget, cctx, ctx): cctx.show_text(what) # Time + cctx.select_font_face( + ctx.font_family, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD + ) cctx.set_font_size(ctx.clock_font_size) _, _, twidth, theight, _, _ = cctx.text_extents(re.sub(r"\d", "8", time)) text_position = wwidth // 2 - twidth // 2, wheight // 3 draw(time, 2) # Date + cctx.select_font_face( + ctx.font_family, cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL + ) cctx.set_font_size(ctx.clock_font_size // 3) _, _, twidth, theight, _, _ = cctx.text_extents(date) text_position = wwidth // 2 - twidth // 2, wheight // 3 + theight * 1.5