mirror of
https://github.com/Tha14/toxic.git
synced 2025-06-20 17:06:36 +02:00
use toxic settings for colour theme instead of config flag
This commit is contained in:
10
src/main.c
10
src/main.c
@ -110,10 +110,12 @@ static void init_term(void)
|
||||
if (has_colors()) {
|
||||
short bg_color = COLOR_BLACK;
|
||||
start_color();
|
||||
#ifdef TOXIC_NATIVE_COLOURS
|
||||
if (assume_default_colors(-1,-1) == OK)
|
||||
bg_color = -1;
|
||||
#endif
|
||||
|
||||
if (user_settings->colour_theme == NATIVE_COLS) {
|
||||
if (assume_default_colors(-1,-1) == OK)
|
||||
bg_color = -1;
|
||||
}
|
||||
|
||||
init_pair(0, COLOR_WHITE, COLOR_BLACK);
|
||||
init_pair(1, COLOR_GREEN, bg_color);
|
||||
init_pair(2, COLOR_CYAN, bg_color);
|
||||
|
@ -61,8 +61,10 @@ static void uset_time(struct user_settings *s, int val)
|
||||
|
||||
static void uset_alerts(struct user_settings *s, int val)
|
||||
{
|
||||
/* alerts default on if invalid value */
|
||||
s->alerts = val == ALERTS_DISABLED ? ALERTS_DISABLED : ALERTS_ENABLED;
|
||||
}
|
||||
|
||||
static void uset_colours(struct user_settings *s, int val)
|
||||
{
|
||||
/* use default toxic colours if invalid value */
|
||||
|
Reference in New Issue
Block a user