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);
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
/* Add widgets to control the ToolPalette appearance: */
- box = gtk_vbox_new (FALSE, 6);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_container_add (GTK_CONTAINER (window), box);
/* Orientation combo box: */
gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
/* Add hbox */
- hbox = gtk_hbox_new (FALSE, 5);
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
/* Add and fill the ToolPalette: */