Parse colors as color_t instead of colorpixel.

With this patch we remove the temporary draw_util_colorpixel_to_color
function we introduced previously by parsing the colors as color_t to
begin with.

relates to #1278
This commit is contained in:
Ingo Bürk
2015-11-16 23:03:39 +01:00
parent fdeb4e0c36
commit a4afd1b642
9 changed files with 45 additions and 55 deletions

View File

@ -332,20 +332,20 @@ CFGFUN(popup_during_fullscreen, const char *value) {
CFGFUN(color_single, const char *colorclass, const char *color) {
/* used for client.background only currently */
config.client.background = get_colorpixel(color);
config.client.background = draw_util_hex_to_color(color);
}
CFGFUN(color, const char *colorclass, const char *border, const char *background, const char *text, const char *indicator) {
#define APPLY_COLORS(classname) \
do { \
if (strcmp(colorclass, "client." #classname) == 0) { \
config.client.classname.border = get_colorpixel(border); \
config.client.classname.background = get_colorpixel(background); \
config.client.classname.text = get_colorpixel(text); \
if (indicator != NULL) { \
config.client.classname.indicator = get_colorpixel(indicator); \
} \
} \
#define APPLY_COLORS(classname) \
do { \
if (strcmp(colorclass, "client." #classname) == 0) { \
config.client.classname.border = draw_util_hex_to_color(border); \
config.client.classname.background = draw_util_hex_to_color(background); \
config.client.classname.text = draw_util_hex_to_color(text); \
if (indicator != NULL) { \
config.client.classname.indicator = draw_util_hex_to_color(indicator); \
} \
} \
} while (0)
APPLY_COLORS(focused_inactive);