mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-23 20:34:46 +02:00
xsecurelock: don't use bold for date
This commit is contained in:
parent
53c5ecdfb2
commit
de2c9879bc
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue