mirror of
https://github.com/Tha14/toxic.git
synced 2024-12-23 20:03:25 +01:00
Use default terminal fg/bg colors when we can.
This commit is contained in:
parent
3b2010200d
commit
82027a5b4f
17
src/main.c
17
src/main.c
@ -106,14 +106,19 @@ static void init_term(void)
|
||||
timeout(100);
|
||||
|
||||
if (has_colors()) {
|
||||
short bg_color = COLOR_BLACK;
|
||||
start_color();
|
||||
#ifdef NCURSES_EXT_FUNCS
|
||||
if (assume_default_colors(-1,-1) == OK)
|
||||
bg_color = -1;
|
||||
#endif
|
||||
init_pair(0, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(1, COLOR_GREEN, COLOR_BLACK);
|
||||
init_pair(2, COLOR_CYAN, COLOR_BLACK);
|
||||
init_pair(3, COLOR_RED, COLOR_BLACK);
|
||||
init_pair(4, COLOR_BLUE, COLOR_BLACK);
|
||||
init_pair(5, COLOR_YELLOW, COLOR_BLACK);
|
||||
init_pair(6, COLOR_MAGENTA, COLOR_BLACK);
|
||||
init_pair(1, COLOR_GREEN, bg_color);
|
||||
init_pair(2, COLOR_CYAN, bg_color);
|
||||
init_pair(3, COLOR_RED, bg_color);
|
||||
init_pair(4, COLOR_BLUE, bg_color);
|
||||
init_pair(5, COLOR_YELLOW, bg_color);
|
||||
init_pair(6, COLOR_MAGENTA, bg_color);
|
||||
init_pair(7, COLOR_BLACK, COLOR_BLACK);
|
||||
init_pair(8, COLOR_BLACK, COLOR_WHITE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user