1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-11 08:28:30 +00:00

core: avoid argb32 roundtrips when calling set_current_text_color

This commit is contained in:
bi4k8 2023-01-09 20:59:21 +00:00 committed by Brenden Matthews
parent ec24079a3a
commit 9cc4b083fc

View File

@ -766,35 +766,35 @@ struct text_object *construct_text_object(char *s, const char *arg, long line,
#endif /* BUILD_NCURSES */
obj->callbacks.print = &new_fg;
#ifdef BUILD_GUI
END OBJ(color0, nullptr) obj->data.l = color[0].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color0, nullptr) Colour c = color[0].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color1, nullptr) obj->data.l = color[1].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color1, nullptr) Colour c = color[1].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color2, nullptr) obj->data.l = color[2].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color2, nullptr) Colour c = color[2].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color3, nullptr) obj->data.l = color[3].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color3, nullptr) Colour c = color[3].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color4, nullptr) obj->data.l = color[4].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color4, nullptr) Colour c = color[4].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color5, nullptr) obj->data.l = color[5].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color5, nullptr) Colour c = color[5].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color6, nullptr) obj->data.l = color[6].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color6, nullptr) Colour c = color[6].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color7, nullptr) obj->data.l = color[7].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color7, nullptr) Colour c = color[7].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color8, nullptr) obj->data.l = color[8].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color8, nullptr) Colour c = color[8].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(color9, nullptr) obj->data.l = color[9].get(*state).to_argb32();
set_current_text_color(Colour::from_argb32(obj->data.l));
END OBJ(color9, nullptr) Colour c = color[9].get(*state);
obj->data.l = c.to_argb32(); set_current_text_color(c);
obj->callbacks.print = &new_fg;
END OBJ(font, nullptr) scan_font(obj, arg);
obj->callbacks.print = &new_font;