Toggleable underline/overline switch added.

This commit is contained in:
LemonBoy 2012-07-25 17:09:04 +02:00
parent a4a3c805e3
commit 3f8bfbe514
2 changed files with 4 additions and 2 deletions

2
bar.c
View File

@ -104,7 +104,7 @@ draw_char (int x, int align, wchar_t ch)
/* Draw the underline */
if (BAR_UNDERLINE_HEIGHT)
xcb_fill_rect (underl_gc, x, BAR_HEIGHT-BAR_UNDERLINE_HEIGHT, ch_width, BAR_UNDERLINE_HEIGHT);
xcb_fill_rect (underl_gc, x, BAR_UNDERLINE*(BAR_HEIGHT-BAR_UNDERLINE_HEIGHT), ch_width, BAR_UNDERLINE_HEIGHT);
/* xcb accepts string in UCS-2 BE, so swap */
ch = (ch >> 8) | (ch << 8);

View File

@ -1,6 +1,8 @@
/* The height of the bar (in pixels) */
#define BAR_HEIGHT 18
/* The thickness of the underline (in pixels) */
/* Choose between an underline or an overline */
#define BAR_UNDERLINE 1
/* The thickness of the underline (in pixels). Set to 0 to disable. */
#define BAR_UNDERLINE_HEIGHT 2
/* Whether to put the bar at the screen bottom or not */
#define BAR_BOTTOM 0