mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 04:06:03 +00:00
more graph stuff
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@649 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
57c08f8209
commit
867a657de9
@ -5196,13 +5196,13 @@ static void draw_line(char *s)
|
|||||||
float gradient_factor = 0;
|
float gradient_factor = 0;
|
||||||
float gradient_update = 0;
|
float gradient_update = 0;
|
||||||
unsigned long tmpcolour = current_color;
|
unsigned long tmpcolour = current_color;
|
||||||
if (specials[special_index].last_colour != specials[special_index].first_colour) {
|
if (specials[special_index].last_colour != 0 && specials[special_index].first_colour != 0) {
|
||||||
tmpcolour = specials[special_index].last_colour;
|
tmpcolour = specials[special_index].last_colour;
|
||||||
gradient_size = gradient_max(specials[special_index].last_colour, specials[special_index].first_colour);
|
gradient_size = gradient_max(specials[special_index].last_colour, specials[special_index].first_colour);
|
||||||
gradient_factor = (float)gradient_size / (w - 2);
|
gradient_factor = (float)gradient_size / (w - 2);
|
||||||
}
|
}
|
||||||
for (i = w - 2; i > -1; i--) {
|
for (i = w - 2; i > -1; i--) {
|
||||||
if (specials[special_index].last_colour != specials[special_index].first_colour) {
|
if (specials[special_index].last_colour != 0 && specials[special_index].first_colour != 0) {
|
||||||
XSetForeground(display, window.gc, tmpcolour);
|
XSetForeground(display, window.gc, tmpcolour);
|
||||||
gradient_update += gradient_factor;
|
gradient_update += gradient_factor;
|
||||||
while (gradient_update > 0) {
|
while (gradient_update > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user