summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfo-cppsp <[email protected]>2017-09-11 16:50:06 +0200
committerinfo-cppsp <[email protected]>2017-09-11 16:50:06 +0200
commitf28be942323a40dd33ef7f3ae1e50a84cf1555ea (patch)
tree1b343324a7a8fbc06b21bda417ac154e7940efc3
parent68356eef7b581f680604e8fd17f8aca23e1d5751 (diff)
downloadmate-sensors-applet-f28be942323a40dd33ef7f3ae1e50a84cf1555ea.tar.bz2
mate-sensors-applet-f28be942323a40dd33ef7f3ae1e50a84cf1555ea.tar.xz
i45 fix graphs invisible
-rw-r--r--sensors-applet/active-sensor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sensors-applet/active-sensor.c b/sensors-applet/active-sensor.c
index 515ad79..78d03b6 100644
--- a/sensors-applet/active-sensor.c
+++ b/sensors-applet/active-sensor.c
@@ -311,15 +311,15 @@ static void active_sensor_update_graph(ActiveSensor *as, cairo_t *cr) {
x, 0);
cairo_pattern_add_color_stop_rgb(pattern,
0,
- as->graph_color.red / 65535.0 - CAIRO_GRAPH_COLOR_GRADIENT,
- as->graph_color.green / 65535.0 - CAIRO_GRAPH_COLOR_GRADIENT,
- as->graph_color.blue / 65535.0 - CAIRO_GRAPH_COLOR_GRADIENT);
+ as->graph_color.red - CAIRO_GRAPH_COLOR_GRADIENT,
+ as->graph_color.green - CAIRO_GRAPH_COLOR_GRADIENT,
+ as->graph_color.blue - CAIRO_GRAPH_COLOR_GRADIENT);
cairo_pattern_add_color_stop_rgb(pattern,
height,
- as->graph_color.red / 65535.0 + CAIRO_GRAPH_COLOR_GRADIENT,
- as->graph_color.green / 65535.0 + CAIRO_GRAPH_COLOR_GRADIENT,
- as->graph_color.blue / 65535.0 + CAIRO_GRAPH_COLOR_GRADIENT);
+ as->graph_color.red + CAIRO_GRAPH_COLOR_GRADIENT,
+ as->graph_color.green + CAIRO_GRAPH_COLOR_GRADIENT,
+ as->graph_color.blue + CAIRO_GRAPH_COLOR_GRADIENT);
cairo_set_source(cr, pattern);
cairo_stroke(cr);