X-Git-Url: https://git.wpitchoune.net/gitweb/?p=psensor.git;a=blobdiff_plain;f=src%2Fgraph.c;h=0ac3143b5372972d4baeb19fcd5fb0124f60d24e;hp=9f87eda76877947871b093410e75f25266a63dff;hb=de58b641143d1fb9622fa4021c2dd1ab50149dee;hpb=3c2d93ab6f3f966a8d76651af59607215753f822 diff --git a/src/graph.c b/src/graph.c index 9f87eda..0ac3143 100644 --- a/src/graph.c +++ b/src/graph.c @@ -297,6 +297,7 @@ static void draw_sensor_smooth_curve(struct psensor *s, int i, dt, vdt, j, k, found; double x[4], y[4], v; time_t t, t0, *stimes; + GdkRGBA *color; if (!times) times = g_hash_table_new_full(g_str_hash, @@ -306,10 +307,13 @@ static void draw_sensor_smooth_curve(struct psensor *s, stimes = g_hash_table_lookup(times, s->id); + color = config_get_sensor_color(s->id); + cairo_set_source_rgb(cr, - s->color->red, - s->color->green, - s->color->blue); + color->red, + color->green, + color->blue); + gdk_rgba_free(color); /* search the index of the first measure used as a start point * of a Bezier curve. The start and end points of the Bezier @@ -399,11 +403,14 @@ static void draw_sensor_curve(struct psensor *s, { int first, i, t, dt, vdt; double v, x, y; + GdkRGBA *color; + color = config_get_sensor_color(s->id); cairo_set_source_rgb(cr, - s->color->red, - s->color->green, - s->color->blue); + color->red, + color->green, + color->blue); + gdk_rgba_free(color); dt = et - bt; first = 1;