diff options
author | Agney Lopes Roth Ferraz <agney@debian.org> | 2009-03-28 22:55:02 -0300 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:48 -0500 |
commit | 1b6665085f47e0a86e4bebd5e313a2ab63600eb4 (patch) | |
tree | 6b7dedc1886b42d07cc48359470fe3f595500cc8 /loadgraph.c | |
parent | 819c0c3382b06fc0f0a1679465966f811aa2e0f8 (diff) | |
parent | 4979bb6cbbbe39eb44c32530cd13f86bf44e5d77 (diff) |
Import Debian changes 0.5c-1
hardinfo (0.5c-1) unstable; urgency=low
* New upstream version.
(Closes: #517591, #511237, #457703, #519256, #449250, #457820, #497758)
Diffstat (limited to 'loadgraph.c')
-rw-r--r-- | loadgraph.c | 14 |
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 |