diff options
author | Benjamin Otte <otte@redhat.com> | 2010-09-27 20:49:06 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-27 20:49:06 +0200 |
commit | 1b170a1a141c6e5622476e5d1e2c30ed24fe9ea6 (patch) | |
tree | 9d7e353a011d6d015381524d928800fe66cfef58 /demos | |
parent | efefc4e79441e6fa086639b9be25fd377bc2e97b (diff) | |
download | gtk+-1b170a1a141c6e5622476e5d1e2c30ed24fe9ea6.tar.gz |
gtk-demo: Clean up toolpalette drawing code
Fix compile warning and use cairo_paint() instead of querying the widget
size and cairo_fill()ing it.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/toolpalette.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c index 537fddd41a..49efd57f33 100644 --- a/demos/gtk-demo/toolpalette.c +++ b/demos/gtk-demo/toolpalette.c @@ -84,15 +84,10 @@ static gboolean canvas_draw (GtkWidget *widget, cairo_t *cr) { - GtkAllocation allocation; GList *iter; - gint width, height; cairo_set_source_rgb (cr, 1, 1, 1); - width = gtk_widget_get_allocated_width (widget); - height = gtk_widget_get_allocated_height (widget); - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); + cairo_paint (cr); for (iter = canvas_items; iter; iter = iter->next) canvas_item_draw (iter->data, cr, FALSE); |