diff options
Diffstat (limited to 'tuiclient/colors.cpp')
-rw-r--r-- | tuiclient/colors.cpp | 63 |
1 files changed, 34 insertions, 29 deletions
diff --git a/tuiclient/colors.cpp b/tuiclient/colors.cpp index 939a006..2bfa699 100644 --- a/tuiclient/colors.cpp +++ b/tuiclient/colors.cpp @@ -25,32 +25,33 @@ */ #include "colors.h" +#include "settings.h" void color_distfile_added(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wattron(window, COLOR_PAIR(4)); + wattron(window, COLOR_PAIR(1)); } } void color_distfile_waiting(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wattron(window, COLOR_PAIR(8)); + wattron(window, COLOR_PAIR(2)); } } void color_distfile_script_rejected(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wattron(window, COLOR_PAIR(9)); + wattron(window, COLOR_PAIR(3)); } } void color_distfile_downloading(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wattron(window, COLOR_PAIR(6)); + wattron(window, COLOR_PAIR(4)); } } @@ -64,22 +65,22 @@ void color_distfile_downloaded(WINDOW * window){ void color_distfile_failed(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wattron(window, COLOR_PAIR(7)); + wattron(window, COLOR_PAIR(6)); } } void color_distfiles_window(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wattron(window, COLOR_PAIR(4)); + wattron(window, COLOR_PAIR(7)); } } void color_scroll_window(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ - wbkgd(window, COLOR_PAIR(5)); - wattron(window, COLOR_PAIR(5)); + wbkgd(window, COLOR_PAIR(8)); + wattron(window, COLOR_PAIR(8)); } } @@ -87,7 +88,7 @@ void color_downloads(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ // wbkgd(window, COLOR_PAIR(1)); - wattron(window, COLOR_PAIR(1)); + wattron(window, COLOR_PAIR(9)); } } @@ -95,7 +96,7 @@ void color_info(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ // wbkgd(window, COLOR_PAIR(2)); - wattron(window,COLOR_PAIR(2)); + wattron(window,COLOR_PAIR(10)); } } @@ -103,7 +104,7 @@ void color_status(WINDOW * window){ if(has_colors()){ start_color(); /* Start color */ // wbkgd(window, COLOR_PAIR(3)); - wattron(window,COLOR_PAIR(3)); + wattron(window,COLOR_PAIR(11)); } } @@ -111,15 +112,17 @@ void colors_connected(){ if(has_colors()){ start_color(); /* Start color */ init_color(COLOR_BLUE, 300, 300, 300); - init_pair(1, COLOR_WHITE, COLOR_BLUE); - init_pair(2, COLOR_BLACK, COLOR_CYAN); - init_pair(3, COLOR_GREEN, COLOR_BLUE); - init_pair(4, COLOR_WHITE, COLOR_BLACK); - init_pair(5, COLOR_GREEN, COLOR_BLACK); - init_pair(6, COLOR_CYAN, COLOR_BLACK); - init_pair(7, COLOR_RED, COLOR_BLACK); - init_pair(8, COLOR_BLUE, COLOR_BLACK); - init_pair(9, COLOR_YELLOW, COLOR_BLACK); + init_pair(1, settings.color_distfile_added_connected_fg, settings.color_distfile_added_connected_bg); + init_pair(2, settings.color_distfile_waiting_connected_fg, settings.color_distfile_waiting_connected_bg); + init_pair(3, settings.color_distfile_script_rejected_connected_fg, settings.color_distfile_script_rejected_connected_bg); + init_pair(4, settings.color_distfile_downloading_connected_fg, settings.color_distfile_downloading_connected_bg); + init_pair(5, settings.color_distfile_downloaded_connected_fg, settings.color_distfile_downloaded_connected_bg); + init_pair(6, settings.color_distfile_failed_connected_fg, settings.color_distfile_failed_connected_bg); + init_pair(7, settings.color_distfiles_window_connected_fg, settings.color_distfiles_window_connected_bg); + init_pair(8, settings.color_scroll_window_connected_fg, settings.color_scroll_window_connected_bg); + init_pair(9, settings.color_downloads_connected_fg, settings.color_downloads_connected_bg); + init_pair(10, settings.color_info_connected_fg, settings.color_info_connected_bg); + init_pair(11, settings.color_status_connected_fg, settings.color_status_connected_bg); // init_pair(4, COLOR_BLACK, COLOR_WHITE); // attrset(A_REVERSE); attrset(A_DIM); @@ -130,15 +133,17 @@ void colors_disconnected(){ if(has_colors()){ start_color(); /* Start color */ init_color(COLOR_BLUE, 400, 400, 400); - init_pair(1, COLOR_BLACK, COLOR_WHITE); - init_pair(2, COLOR_WHITE, COLOR_BLACK); - init_pair(3, COLOR_BLACK, COLOR_RED); - init_pair(4, COLOR_WHITE, COLOR_BLACK); - init_pair(5, COLOR_WHITE, COLOR_BLACK); - init_pair(6, COLOR_WHITE, COLOR_BLACK); - init_pair(7, COLOR_WHITE, COLOR_BLACK); - init_pair(8, COLOR_WHITE, COLOR_BLACK); - init_pair(9, COLOR_WHITE, COLOR_BLACK); + init_pair(1, settings.color_distfile_added_disconnected_fg, settings.color_distfile_added_disconnected_bg); + init_pair(2, settings.color_distfile_waiting_disconnected_fg, settings.color_distfile_waiting_disconnected_bg); + init_pair(3, settings.color_distfile_script_rejected_disconnected_fg, settings.color_distfile_script_rejected_disconnected_bg); + init_pair(4, settings.color_distfile_downloading_disconnected_fg, settings.color_distfile_downloading_disconnected_bg); + init_pair(5, settings.color_distfile_downloaded_disconnected_fg, settings.color_distfile_downloaded_disconnected_bg); + init_pair(6, settings.color_distfile_failed_disconnected_fg, settings.color_distfile_failed_disconnected_bg); + init_pair(7, settings.color_distfiles_window_disconnected_fg, settings.color_distfiles_window_disconnected_bg); + init_pair(8, settings.color_scroll_window_disconnected_fg, settings.color_scroll_window_disconnected_bg); + init_pair(9, settings.color_downloads_disconnected_fg, settings.color_downloads_disconnected_bg); + init_pair(10, settings.color_info_disconnected_fg, settings.color_info_disconnected_bg); + init_pair(11, settings.color_status_disconnected_fg, settings.color_status_disconnected_bg); /// attrset(A_BOLD); // attrset(A_REVERSE); } |