fix font display height in i3bar
Patch status: merged
Patch by jj
Long description:
Increase the drawing area height, in order to prevent the font from being cut off. fixes #992
To apply this patch, use:
curl http://cr.i3wm.org/patch/137/raw.patch | git am
b/i3bar/src/xcb.c
| 17 |
@@ -165,7 +165,7 @@ void refresh_statusline(void) {
|
| 18 |
realloc_sl_buffer(); |
| 19 |
|
| 20 |
/* Clear the statusline pixmap. */ |
| 21 |
- xcb_rectangle_t rect = { 0, 0, root_screen->width_in_pixels, font.height };
|
| 22 |
+ xcb_rectangle_t rect = { 0, 0, root_screen->width_in_pixels, font.height + 2 };
|
| 23 |
xcb_poly_fill_rectangle(xcb_connection, statusline_pm, statusline_clear, 1, &rect); |
| 24 |
|
| 25 |
/* Draw the text of each block. */ |
| 26 |
@@ -1610,7 +1610,7 @@ void draw_bars(bool unhide) {
|
| 27 |
outputs_walk->bargc, |
| 28 |
MAX(0, (int16_t)(statusline_width - outputs_walk->rect.w + 4)), 0, |
| 29 |
MAX(0, (int16_t)(outputs_walk->rect.w - statusline_width - traypx - 4)), 3, |
| 30 |
- MIN(outputs_walk->rect.w - traypx - 4, statusline_width), font.height); |
| 31 |
+ MIN(outputs_walk->rect.w - traypx - 4, statusline_width), font.height + 2); |
| 32 |
} |
| 33 |
|
| 34 |
if (config.disable_ws) {
|