diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-03-24 13:41:49 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-24 12:44:25 +0000 |
commit | d35a4e82849354ec61dc0600938bb560fd57bfa3 (patch) | |
tree | 11a2ae5636aa824020c68696973e5cb5b7d2ab93 /ui | |
parent | 698e8296aacf7499aff8010ecd16fc67979ec689 (diff) |
Get rid of the background pixmap, set the background color directly.
Change-Id: I7b291892b041055fe4165abcbb2962a295aedce4
Reviewed-on: https://code.wireshark.org/review/811
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/graph_analysis.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/ui/gtk/graph_analysis.c b/ui/gtk/graph_analysis.c index 7ea16fe076..6b959a97f9 100644 --- a/ui/gtk/graph_analysis.c +++ b/ui/gtk/graph_analysis.c @@ -344,6 +344,8 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) GdkRGBA grey_color0 = {0.3945, 0.3945, 0.3945, 1.0}; GdkRGBA grey_color1 = {0.1484, 0.1484, 0.1484, 1.0}; + GdkRGBA bg_color = {0.9137, 0.8901, 0.8705, 1.0}; + static GdkRGBA background_color[MAX_NUM_COL_CONV+1] = { /* Red, Green, Blue Alpha */ {0.0039, 0.0039, 1.0000, 1.0}, @@ -359,9 +361,6 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) {0.8281, 0.8281, 0.8281, 1.0} }; - /* XXX can't we just set the background color ? */ - GdkPixbuf *bg_pixbuf; - /* Dashed line pattern */ static const double dashed1[] = {5.0, 4.0}; static int len1 = sizeof(dashed1) / sizeof(dashed1[0]); @@ -372,7 +371,6 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) return; } - bg_pixbuf = gdk_pixbuf_new_from_xpm_data(voip_bg_xpm); user_data->dlg.needs_redraw = FALSE; gtk_widget_get_allocation(user_data->dlg.draw_area_time, &draw_area_time_alloc); @@ -506,24 +504,21 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) #if GTK_CHECK_VERSION(2,22,0) /* Paint time title background */ cr = cairo_create (user_data->dlg.surface_time); - gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); + gdk_cairo_set_source_rgba (cr, &bg_color); cairo_rectangle (cr, 0, 0, draw_area_time_alloc.width, top_y_border); cairo_fill (cr); cairo_destroy (cr); /* Paint main title background */ cr = cairo_create (user_data->dlg.surface_main); - gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); + gdk_cairo_set_source_rgba (cr, &bg_color); cairo_rectangle (cr, 0, 0, draw_area_alloc.width, top_y_border); cairo_fill (cr); cairo_destroy (cr); /* Paint main comment background */ cr = cairo_create (user_data->dlg.surface_comments); - gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); + gdk_cairo_set_source_rgba (cr, &bg_color); cairo_rectangle (cr, 0, 0, draw_area_comments_alloc.width, top_y_border); cairo_fill (cr); cairo_destroy (cr); @@ -531,9 +526,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) /* Paint time title background */ if ( GDK_IS_DRAWABLE(user_data->dlg.pixmap_time) ) { cr = gdk_cairo_create (user_data->dlg.pixmap_time); - gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); - cairo_rectangle (cr, 0, 0, draw_area_time_alloc.width, top_y_border); + gdk_cairo_set_source_rgba (cr, &bg_color); cairo_fill (cr); cairo_destroy (cr); @@ -541,8 +534,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) /* Paint main title background */ if ( GDK_IS_DRAWABLE(user_data->dlg.pixmap_main) ) { cr = gdk_cairo_create (user_data->dlg.pixmap_main); - gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); + gdk_cairo_set_source_rgba (cr, &bg_color); cairo_rectangle (cr, 0, 0, draw_area_alloc.width, top_y_border); cairo_fill (cr); cairo_destroy (cr); @@ -551,8 +543,7 @@ static void dialog_graph_draw(graph_analysis_data_t *user_data) /* Paint main comment background */ if ( GDK_IS_DRAWABLE(user_data->dlg.pixmap_comments) ) { cr = gdk_cairo_create (user_data->dlg.pixmap_comments); - gdk_cairo_set_source_pixbuf (cr, bg_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); + gdk_cairo_set_source_rgba (cr, &bg_color); cairo_rectangle (cr, 0, 0, draw_area_comments_alloc.width, top_y_border); cairo_fill (cr); cairo_destroy (cr); |