diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-05-15 10:29:22 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-05-18 11:03:03 +0200 |
commit | 4210fdd38a511f1ea2529eea2dfd5d55ab144e37 (patch) | |
tree | 7f715c8c8d0125828197e0098466e835e0612a59 /src/wins.c | |
parent | fbd065161571fc16b3fc26e9aa6fd012ef27ffa0 (diff) | |
download | calcurse-4210fdd38a511f1ea2529eea2dfd5d55ab144e37.zip |
Add support for drawing highlighted decoration
This allows for drawing selected scroll windows and list boxes with a
highlighted border.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/wins.c')
-rw-r--r-- | src/wins.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -325,17 +325,24 @@ void wins_scrollwin_delete(struct scrollwin *sw) } /* Draw window border and label. */ -void wins_scrollwin_draw_deco(struct scrollwin *sw) +void wins_scrollwin_draw_deco(struct scrollwin *sw, int hilt) { + if (hilt) + wattron(sw->win, A_BOLD | COLOR_PAIR(COLR_CUSTOM)); + box(sw->win, 0, 0); if (!conf.compact_panels) { mvwaddch(sw->win, 2, 0, ACS_LTEE); mvwhline(sw->win, 2, 1, ACS_HLINE, sw->w - 2); mvwaddch(sw->win, 2, sw->w - 1, ACS_RTEE); + } + if (hilt) + wattroff(sw->win, A_BOLD | COLOR_PAIR(COLR_CUSTOM)); + + if (!conf.compact_panels) print_in_middle(sw->win, 1, 0, sw->w, sw->label); - } } /* Display a scrolling window. */ |