X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fgraph.c;h=06d7c8b4693381263edddcb112f2e3370c5da2df;hb=e57d7f801ae20f02e0cb28107a89b31fa51de1c1;hp=98b208bfaaec903290fbb02fa24d57dfcf06a69e;hpb=7e5d6b8c9e50f45b92357643c327a5ae5ad5ef4d;p=psensor.git diff --git a/src/graph.c b/src/graph.c index 98b208b..06d7c8b 100644 --- a/src/graph.c +++ b/src/graph.c @@ -240,10 +240,15 @@ graph_update(struct psensor **sensors, max_rpm = get_max_rpm(sensors); mint = get_min_temp(sensors); - strmin = psensor_value_to_string(SENSOR_TYPE_TEMP, mint); + + strmin = psensor_value_to_string(SENSOR_TYPE_TEMP, + mint, + config->temperature_unit == CELCIUS); maxt = get_max_temp(sensors); - strmax = psensor_value_to_string(SENSOR_TYPE_TEMP, maxt); + strmax = psensor_value_to_string(SENSOR_TYPE_TEMP, + maxt, + config->temperature_unit == CELCIUS); str_btime = time_to_str(get_graph_begin_time_s(config)); str_etime = time_to_str(get_graph_end_time_s()); @@ -288,7 +293,7 @@ graph_update(struct psensor **sensors, window); /** Set the color for text drawing */ - style_ctx = gtk_widget_get_style_context(w_graph); + style_ctx = gtk_widget_get_style_context(window); gtk_style_context_get_color(style_ctx, GTK_STATE_FLAG_NORMAL, &rgba); cairo_set_source_rgb(cr, rgba.red, rgba.green, rgba.blue);