1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

It's possible to use black foreground color now.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2418 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-02-10 14:21:29 +00:00 committed by cras
parent c1d61ddeaf
commit 83f6408979
2 changed files with 4 additions and 4 deletions

View File

@ -244,8 +244,8 @@ static void sig_gui_print_text(WINDOW_REC *window, void *fgcolor,
if (window == NULL) { if (window == NULL) {
g_return_if_fail(next_xpos != -1); g_return_if_fail(next_xpos != -1);
attr |= fg > 0 ? fg : ATTR_RESETFG; attr |= fg >= 0 ? fg : ATTR_RESETFG;
attr |= bg > 0 ? (bg << 4) : ATTR_RESETBG; attr |= bg >= 0 ? (bg << 4) : ATTR_RESETBG;
term_set_color(root_window, attr); term_set_color(root_window, attr);
term_move(root_window, next_xpos, next_ypos); term_move(root_window, next_xpos, next_ypos);

View File

@ -114,7 +114,7 @@ static void update_cmd_color(unsigned char cmd, int *color)
if ((cmd & LINE_COLOR_DEFAULT) == 0) if ((cmd & LINE_COLOR_DEFAULT) == 0)
*color |= (cmd & 0x0f) << 4; *color |= (cmd & 0x0f) << 4;
else { else {
*color |= ATTR_RESETBG; *color = (*color & FGATTR) | ATTR_RESETBG;
if (cmd & LINE_COLOR_BLINK) if (cmd & LINE_COLOR_BLINK)
*color |= ATTR_BLINK; *color |= ATTR_BLINK;
} }
@ -124,7 +124,7 @@ static void update_cmd_color(unsigned char cmd, int *color)
if ((cmd & LINE_COLOR_DEFAULT) == 0) if ((cmd & LINE_COLOR_DEFAULT) == 0)
*color |= cmd & 0x0f; *color |= cmd & 0x0f;
else { else {
*color |= ATTR_RESETFG; *color = (*color & BGATTR) | ATTR_RESETFG;
if (cmd & LINE_COLOR_BOLD) if (cmd & LINE_COLOR_BOLD)
*color |= ATTR_BOLD; *color |= ATTR_BOLD;
} }