aboutsummaryrefslogtreecommitdiff
path: root/loadgraph.c
diff options
context:
space:
mode:
authorSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:48 -0500
committerSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:48 -0500
commit4979bb6cbbbe39eb44c32530cd13f86bf44e5d77 (patch)
tree614372cf2510ad45311ecea088012683635d0b76 /loadgraph.c
parentee6c3f9b4cf08a276c971dee66e1acdb32b3dff9 (diff)
Import Upstream version 0.5c
Diffstat (limited to 'loadgraph.c')
-rw-r--r--loadgraph.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/loadgraph.c b/loadgraph.c
index 3a535f5b..c8503072 100644
--- a/loadgraph.c
+++ b/loadgraph.c
@@ -6,7 +6,7 @@
* - fixes autoscaling
* - add color
*
- * Copyright (C) 2006 Leandro A. F. Pereira <leandro@linuxmag.com.br>
+ * Copyright (C) 2006 Leandro A. F. Pereira <leandro@hardinfo.org>
*
* The Simple Load Graph is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -37,12 +37,12 @@ LoadGraph *load_graph_new(gint size)
lg->suffix = g_strdup("");
lg->area = gtk_drawing_area_new();
- lg->size = size;
- lg->data = g_new0(gint, size);
+ lg->size = (size * 3) / 2;
+ lg->data = g_new0(gint, lg->size);
lg->scale = 1.0;
- lg->width = size * 4;
+ lg->width = size * 6;
lg->height = size * 2;
lg->max_value = 1;
@@ -103,7 +103,7 @@ void load_graph_set_color(LoadGraph * lg, LoadGraphColor color)
lg->color = color;
gdk_rgb_gc_set_foreground(lg->trace, lg->color);
gdk_rgb_gc_set_foreground(lg->fill, lg->color - 0x303030);
- gdk_rgb_gc_set_foreground(lg->grid, lg->color - 0x404040);
+ gdk_rgb_gc_set_foreground(lg->grid, lg->color - 0xcdcdcd);
}
void load_graph_destroy(LoadGraph * lg)
@@ -125,7 +125,7 @@ static gboolean _expose(GtkWidget * widget, GdkEventExpose * event,
GdkDrawable *draw = GDK_DRAWABLE(lg->buf);
gdk_draw_drawable(lg->area->window,
- lg->area->style->white_gc,
+ lg->area->style->black_gc,
draw, 0, 0, 0, 0, lg->width, lg->height);
return FALSE;
}
@@ -148,6 +148,8 @@ void load_graph_configure_expose(LoadGraph * lg)
gdk_gc_set_line_attributes(lg->grid,
1, GDK_LINE_ON_OFF_DASH,
GDK_CAP_NOT_LAST, GDK_JOIN_ROUND);
+ gdk_gc_set_dashes(lg->grid, 0, (gint8*)"\2\2", 2);
+
#if 0 /* old-style grid */
gdk_rgb_gc_set_foreground(lg->grid, 0x707070);
#endif