From 85f75efa312c290c57f118312a5a56b774977a2c Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Thu, 18 May 2006 01:25:03 +0000 Subject: [PATCH] * Fixed issue with graphs not reaching all the way to the borders (sf.net bug 1470480) * Cleaned up units git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@647 7f574dfc-610e-0410-a909-a81674777703 --- ChangeLog | 5 +++++ src/conky.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c6e23b42..22d0666f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ # $Id$ +2006-05-17 + * Fixed issue with graphs not reaching all the way to the borders + (sf.net bug 1470480) + * Cleaned up units + 2006-05-15 * Conky 1.4.2 released diff --git a/src/conky.c b/src/conky.c index 501cc736..28a95778 100644 --- a/src/conky.c +++ b/src/conky.c @@ -5199,9 +5199,9 @@ static void draw_line(char *s) if (specials[special_index].last_colour != specials[special_index].first_colour) { tmpcolour = specials[special_index].last_colour; gradient_size = gradient_max(specials[special_index].last_colour, specials[special_index].first_colour); - gradient_factor = (float)gradient_size / (w - 3); + gradient_factor = (float)gradient_size / (w); } - for (i = w - 3; i > 0; i--) { + for (i = w; i > -1; i--) { if (specials[special_index].last_colour != specials[special_index].first_colour) { XSetForeground(display, window.gc, tmpcolour); gradient_update += gradient_factor; @@ -5210,10 +5210,10 @@ static void draw_line(char *s) gradient_update--; } } - if ((w - 3 - i) / ((float) (w - 3) / (specials[special_index].graph_width)) > j) { + if ((w - i) / ((float) (w) / (specials[special_index].graph_width)) > j) { j++; } - XDrawLine(display, window.drawable, window.gc, cur_x + i + 2, by + h, cur_x + i + 2, by + h - specials[special_index].graph[j] * (h - 1) / specials[special_index].graph_scale); /* this is mugfugly, but it works */ + XDrawLine(display, window.drawable, window.gc, cur_x + i - 1, by + h, cur_x + i - 1, by + h - specials[special_index].graph[j] * (h - 1) / specials[special_index].graph_scale); /* this is mugfugly, but it works */ } if (specials[special_index]. height > cur_y_add