From f8e6e0d69162ee30998e433bdcd223c9537937b0 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Sun, 10 Dec 2017 00:02:08 +0100 Subject: Fix no-colour theme In colour customization, pressing cancel ('ESC' by default) will deselect all colours and put calcurse in no-color mode. For this to work, all colour changes must be performed with the routines custom_apply_attr()/custom_remove_attr(). Fixed for the getstring cursor, the scroll window border and the week number. In addition, the week number is unconditionally coloured as the rest of the calendar contents whether CAL is selected or not. Signed-off-by: Lukas Fleischer --- src/wins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/wins.c') diff --git a/src/wins.c b/src/wins.c index d664e3e..4a34606 100644 --- a/src/wins.c +++ b/src/wins.c @@ -337,7 +337,7 @@ void wins_scrollwin_delete(struct scrollwin *sw) void wins_scrollwin_draw_deco(struct scrollwin *sw, int hilt) { if (hilt) - wattron(sw->win, A_BOLD | COLOR_PAIR(COLR_CUSTOM)); + custom_apply_attr(sw->win, ATTR_HIGHEST); box(sw->win, 0, 0); @@ -348,7 +348,7 @@ void wins_scrollwin_draw_deco(struct scrollwin *sw, int hilt) } if (hilt) - wattroff(sw->win, A_BOLD | COLOR_PAIR(COLR_CUSTOM)); + custom_remove_attr(sw->win, ATTR_HIGHEST); if (!conf.compact_panels) print_in_middle(sw->win, 1, 0, sw->w, sw->label); -- cgit v1.2.3-54-g00ecf