aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorLars Henriksen <LarsHenriksen@get2net.dk>2017-12-07 16:36:01 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2017-12-10 14:33:31 +0100
commite733d09ea02897e7013a0745223b777ae5981fd5 (patch)
treeaef4173e5f34d69feda7b596b6b8b145133ca508 /src/utils.c
parent95c5d576fafa2f705e6562f57bab9a9d583c8776 (diff)
downloadcalcurse-e733d09ea02897e7013a0745223b777ae5981fd5.tar.gz
calcurse-e733d09ea02897e7013a0745223b777ae5981fd5.zip
Default colour as foreground colour
In the default colour setup (white on black), white could only with great difficulty be used as customized foreground colour, because the colour pair COLR_CUSTOM then was identical to COLR_DEFAULT (default on default). This made it impossible to distinguish the selected element in lists. The patch turns on the video attribute bold when default is chosen as foreground colour. Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index c046ad5..2440c44 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -669,6 +669,12 @@ print_bool_option_incolor(WINDOW * win, unsigned option, int pos_y,
EXIT(_("option not defined"));
}
+ /*
+ * Possibly nested custom_apply_attr() calls. Turn
+ * custom_apply_attr(ATTR_HIGHEST) off explicitly,
+ * while it may have other attributes besides the colour.
+ */
+ custom_remove_attr(win, ATTR_HIGHEST);
custom_apply_attr(win, color);
mvwaddstr(win, pos_y, pos_x, option_value);
custom_remove_attr(win, color);