diff options
author | Andrés <andmarti@gmail.com> | 2021-03-14 00:13:15 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-03-14 00:13:15 -0300 |
commit | c4372c31ce07f6fce8b41486f6b8ba2956965a96 (patch) | |
tree | 40e0708d728110e540a7482168df02292b9ddec2 /src/color.c | |
parent | 34705e4a01bb5c902f9d6bd8d6fc3e528d68e0a1 (diff) |
Fixed SIGWINCH when input bar is at bottom
Added new HEADINGS_ODD, GRID_PAIR, and GRID_ODD types.
Can be used like this:
DEFINE_COLOR "cornsilk" 255 248 220
DEFINE_COLOR "wheat" 245 222 179
DEFINE_COLOR "dark_khaki" 189 183 107
DEFINE_COLOR "gray50" 127 127 127
DEFINE_COLOR "gray80" 204 204 204
DEFINE_COLOR "gray90" 229 229 229
color "type=GRID_PAIR fg=dark_khaki bg=cornsilk"
color "type=GRID_ODD fg=dark_khaki bg=wheat"
color "type=HEADINGS fg=dark_khaki bg=gray50"
color "type=HEADINGS_ODD fg=gray50 bg=gray90"
Diffstat (limited to 'src/color.c')
-rw-r--r-- | src/color.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/color.c b/src/color.c index c17ca70..547c67b 100644 --- a/src/color.c +++ b/src/color.c @@ -97,8 +97,14 @@ void start_default_ucolors() { // Set some colors attributes ucolors[ DEFAULT ].fg = WHITE; ucolors[ DEFAULT ].bg = DEFAULT_COLOR; - ucolors[ HEADINGS ].fg = RED; - ucolors[ HEADINGS ].bg = WHITE; + ucolors[ HEADINGS ].bg = RED; + ucolors[ HEADINGS ].fg = WHITE; + ucolors[ HEADINGS_ODD ].bg = RED; + ucolors[ HEADINGS_ODD ].fg = WHITE; + ucolors[ GRID_PAIR ].fg = WHITE; + ucolors[ GRID_PAIR ].bg = DEFAULT_COLOR; + ucolors[ GRID_ODD ].fg = WHITE; + ucolors[ GRID_ODD ].bg = DEFAULT_COLOR; ucolors[ WELCOME ].fg = WHITE; ucolors[ WELCOME ].bg = DEFAULT_COLOR; ucolors[ WELCOME ].bold = 1; @@ -126,7 +132,7 @@ void start_default_ucolors() { ucolors[ MODE ].bg = DEFAULT_COLOR; ucolors[ MODE ].bold = 1; ucolors[ CELL_ID ].fg = WHITE; - ucolors[ CELL_ID ].bg = BLACK; + ucolors[ CELL_ID ].bg = DEFAULT_COLOR; ucolors[ CELL_ID ].bold = 1; ucolors[ CELL_FORMAT ].fg = RED; ucolors[ CELL_FORMAT ].bg = DEFAULT_COLOR; @@ -185,6 +191,12 @@ void set_colors_param_dict() { put(d_colors_param, "WHITE", str); sprintf(str, "%d", HEADINGS); put(d_colors_param, "HEADINGS", str); + sprintf(str, "%d", HEADINGS_ODD); + put(d_colors_param, "HEADINGS_ODD", str); + sprintf(str, "%d", GRID_PAIR); + put(d_colors_param, "GRID_PAIR", str); + sprintf(str, "%d", GRID_ODD); + put(d_colors_param, "GRID_ODD", str); sprintf(str, "%d", WELCOME); put(d_colors_param, "WELCOME", str); sprintf(str, "%d", CELL_SELECTION); @@ -619,7 +631,6 @@ int define_color(char * color, int r, int g, int b) { cc->r = r; cc->g = g; cc->b = b; - //sc_debug("modified extended color: %d", 7 + cc->number); init_extended_color(7 + cc->number, RGB(r, g, b)); if (! loading) sc_info("Defined custom color #%d with name '%s' and RGB values %d %d %d", cc->number, cc->name, cc->r, cc->g, cc->b); |