From 2f7408e848155bcf81a674f63acfb10123323018 Mon Sep 17 00:00:00 2001 From: krypt-n Date: Thu, 9 Oct 2014 22:22:28 +0200 Subject: [PATCH] Fixes problem with y offset and right/center alignment --- bar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bar.c b/bar.c index 5365b0a..6bd780e 100644 --- a/bar.c +++ b/bar.c @@ -181,7 +181,6 @@ draw_char (monitor_t *mon, font_t *cur_font, int x, int align, wchar_t ch) } else { ch_width = cur_font->width_lut[ch - cur_font->char_min].character_width; } - switch (align) { case ALIGN_C: xcb_copy_area(c, mon->pixmap, mon->pixmap, gc[GC_DRAW], mon->width / 2 - x / 2, 0, @@ -196,7 +195,7 @@ draw_char (monitor_t *mon, font_t *cur_font, int x, int align, wchar_t ch) } /* Draw the background first */ - fill_rect(mon->pixmap, gc[GC_CLEAR], x, by, ch_width, bh); + fill_rect(mon->pixmap, gc[GC_CLEAR], x, 0, ch_width, bh); int y = bh / 2 + cur_font->height / 2- cur_font->descent; if (cur_font->xft_ft) {