From e1303ce1873d03bac6f52037c554af24507fb830 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 21 Jun 2024 18:13:29 +0900 Subject: Init --- slock/slock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'slock/slock.c') diff --git a/slock/slock.c b/slock/slock.c index 0cb1b74..c7bf489 100644 --- a/slock/slock.c +++ b/slock/slock.c @@ -186,7 +186,7 @@ static void writemessage(Display *dpy, Window win, int screen) { XftTextExtentsUtf8(dpy, font, (FcChar8 *)message, strlen(message), &extents); // Center the text horizontally and vertically x = (attr.width - extents.xOff) / 2; - y = (attr.height - (font->ascent + font->descent)) / 1.32 + font->ascent; + y = (attr.height - (font->ascent + font->descent)) / 1.185 + font->ascent; // Draw the text XftDrawStringUtf8(draw, &color, font, x, y, (FcChar8 *)message, strlen(message)); @@ -285,7 +285,7 @@ refresh(Display *dpy, Window win , int screen, struct tm time, cairo_t* cr, cair // Measure the text to be rendered cairo_text_extents(cr, tm, &extents); xpos = (DisplayWidth(dpy, screen) - extents.width) / 2 - extents.x_bearing; - ypos = (DisplayHeight(dpy, screen) - extents.height) / 1.2 - extents.y_bearing; + ypos = (DisplayHeight(dpy, screen) - extents.height) / 1.1 - extents.y_bearing; cairo_move_to(cr, xpos, ypos); cairo_show_text(cr, tm); -- cgit v1.2.3