From 2a8cbd9a9ea72ee37be2fcbe40bea8d9695975f6 Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Fri, 20 Jul 2012 06:16:28 +0800 Subject: [PATCH] Fix bar text vertical positioning. Remove extra vertical padding from bar. --- spectrwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 596db23..e976c4b 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1394,7 +1394,8 @@ bar_print(struct swm_region *r, const char *s) DefaultVisual(display, r->s->idx), DefaultColormap(display, r->s->idx)); - XftDrawStringUtf8(draw, &bar_font_color, bar_font, x, bar_font->height, + XftDrawStringUtf8(draw, &bar_font_color, bar_font, x, + (HEIGHT(r->bar) + bar_font->height) / 2 - bar_font->descent, (FcChar8 *)s, len); XftDrawDestroy(draw); @@ -1912,7 +1913,7 @@ bar_setup(struct swm_region *r) if (bar_font == NULL) errx(1, "unable to open a font"); - bar_height = bar_font->height + 4 * bar_border_width; + bar_height = bar_font->height + 2 * bar_border_width; if (bar_height < 1) bar_height = 1; -- 1.7.10.4