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

@ -191,13 +191,13 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
/* Initialize default colors */
#define INIT_COLOR(x, cborder, cbackground, ctext, cindicator) \
do { \
x.border = get_colorpixel(cborder); \
x.background = get_colorpixel(cbackground); \
x.text = get_colorpixel(ctext); \
x.indicator = get_colorpixel(cindicator); \
x.border = draw_util_hex_to_color(cborder); \
x.background = draw_util_hex_to_color(cbackground); \
x.text = draw_util_hex_to_color(ctext); \
x.indicator = draw_util_hex_to_color(cindicator); \
} while (0)
config.client.background = get_colorpixel("#000000");
config.client.background = draw_util_hex_to_color("#000000");
INIT_COLOR(config.client.focused, "#4c7899", "#285577", "#ffffff", "#2e9ef4");
INIT_COLOR(config.client.focused_inactive, "#333333", "#5f676a", "#ffffff", "#484e50");
INIT_COLOR(config.client.unfocused, "#333333", "#222222", "#888888", "#292d2e");