diff --git a/src/color.c b/src/color.c index 774da9b0e4dd4d05e1dfecc89964ac858f6bd2e5..1caea04a60877b839cf61151c60b2a39759b8af9 100644 --- a/src/color.c +++ b/src/color.c @@ -62,8 +62,9 @@ void set_colorpairs(void) if (background == -1 && !using_defaults) background = COLOR_BLACK; init_pair(i + 1, foreground, background); - interface_color_pair[i].bright = bright; - interface_color_pair[i].pairnum = COLOR_PAIR(i + 1); + interface_color_pair[i].bright = FALSE; + interface_color_pair[i].pairnum = + COLOR_PAIR(i + 1) | (bright ? A_BOLD : A_NORMAL); } else { interface_color_pair[i].bright = FALSE; diff --git a/src/prompt.c b/src/prompt.c index dda95838d109ed4b94269b4ef90409a812458fde..4c81a123be2c554fa3600d7ddbbb7019d3fdcd7f 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -491,8 +491,6 @@ void update_the_statusbar(void) index = strnlenpt(answer, statusbar_x); page_start = get_statusbar_page_start(start_col, start_col + index); - if (interface_color_pair[TITLE_BAR].bright) - wattron(bottomwin, A_BOLD); wattron(bottomwin, interface_color_pair[TITLE_BAR].pairnum); blank_statusbar(); @@ -505,7 +503,6 @@ void update_the_statusbar(void) waddstr(bottomwin, expanded); free(expanded); - wattroff(bottomwin, A_BOLD); wattroff(bottomwin, interface_color_pair[TITLE_BAR].pairnum); statusbar_pww = statusbar_xplustabs(); @@ -855,14 +852,11 @@ int do_yesno_prompt(bool all, const char *msg) onekey("^C", _("Cancel"), width); } - if (interface_color_pair[TITLE_BAR].bright) - wattron(bottomwin, A_BOLD); wattron(bottomwin, interface_color_pair[TITLE_BAR].pairnum); blank_statusbar(); mvwaddnstr(bottomwin, 0, 0, msg, actual_x(msg, COLS - 1)); - wattroff(bottomwin, A_BOLD); wattroff(bottomwin, interface_color_pair[TITLE_BAR].pairnum); /* Refresh edit window and statusbar before getting input. */ diff --git a/src/winio.c b/src/winio.c index d26cea0d9f7a536b384cd8a8a9764f65b24c6793..62cbd4c2fdf9471c6fc7412db34117e553197c69 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1868,8 +1868,6 @@ void titlebar(const char *path) assert(path != NULL || openfile->filename != NULL); - if (interface_color_pair[TITLE_BAR].bright) - wattron(topwin, A_BOLD); wattron(topwin, interface_color_pair[TITLE_BAR].pairnum); blank_titlebar(); @@ -1957,7 +1955,6 @@ void titlebar(const char *path) else if (statelen > 0) mvwaddnstr(topwin, 0, 0, state, actual_x(state, COLS)); - wattroff(topwin, A_BOLD); wattroff(topwin, interface_color_pair[TITLE_BAR].pairnum); wnoutrefresh(topwin); @@ -2027,14 +2024,11 @@ void statusline(message_type importance, const char *msg, ...) start_x = (COLS - strlenpt(foo) - 4) / 2; wmove(bottomwin, 0, start_x); - if (interface_color_pair[STATUS_BAR].bright) - wattron(bottomwin, A_BOLD); wattron(bottomwin, interface_color_pair[STATUS_BAR].pairnum); waddstr(bottomwin, "[ "); waddstr(bottomwin, foo); free(foo); waddstr(bottomwin, " ]"); - wattroff(bottomwin, A_BOLD); wattroff(bottomwin, interface_color_pair[STATUS_BAR].pairnum); /* Push the message to the screen straightaway. */ @@ -2132,22 +2126,16 @@ void onekey(const char *keystroke, const char *desc, int length) { assert(keystroke != NULL && desc != NULL); - if (interface_color_pair[KEY_COMBO].bright) - wattron(bottomwin, A_BOLD); wattron(bottomwin, interface_color_pair[KEY_COMBO].pairnum); waddnstr(bottomwin, keystroke, actual_x(keystroke, length)); - wattroff(bottomwin, A_BOLD); wattroff(bottomwin, interface_color_pair[KEY_COMBO].pairnum); length -= strlenpt(keystroke) + 1; if (length > 0) { waddch(bottomwin, ' '); - if (interface_color_pair[FUNCTION_TAG].bright) - wattron(bottomwin, A_BOLD); wattron(bottomwin, interface_color_pair[FUNCTION_TAG].pairnum); waddnstr(bottomwin, desc, actual_x(desc, length)); - wattroff(bottomwin, A_BOLD); wattroff(bottomwin, interface_color_pair[FUNCTION_TAG].pairnum); } }