From 3f8bfbe514969216b0b7506467d380a3228f9514 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 25 Jul 2012 17:09:04 +0200 Subject: [PATCH] Toggleable underline/overline switch added. --- bar.c | 2 +- config.def.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bar.c b/bar.c index 281e4b1..c91c905 100644 --- a/bar.c +++ b/bar.c @@ -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); diff --git a/config.def.h b/config.def.h index d22089f..0a01d8d 100644 --- a/config.def.h +++ b/config.def.h @@ -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