diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-06-21 18:13:29 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2024-06-21 18:13:29 +0900 |
| commit | e1303ce1873d03bac6f52037c554af24507fb830 (patch) | |
| tree | 9c2e0aa9993da18f00301248a49fb1605be79a2d /slock/slock.c | |
| parent | 91f85d52dad85c57ba3f08105a927142157d6dcd (diff) | |
Init
Diffstat (limited to 'slock/slock.c')
| -rw-r--r-- | slock/slock.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |
