]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkmenuitem.c
More extensive debugging output
[~andy/gtk] / gtk / gtkmenuitem.c
index 3d228d8648ad1b33818ae0a834ba456949ef0431..152d427575eb7b11552fee14a3d019a31aa30fbb 100644 (file)
@@ -395,8 +395,8 @@ gtk_menu_item_size_allocate (GtkWidget     *widget,
                             widget->style->klass->xthickness +
                            BORDER_SPACING);
       child_allocation.y = GTK_CONTAINER (widget)->border_width;
-      child_allocation.width = allocation->width - child_allocation.x * 2;
-      child_allocation.height = allocation->height - child_allocation.y * 2;
+      child_allocation.width = MAX (0, allocation->width - child_allocation.x * 2);
+      child_allocation.height = MAX (0, allocation->height - child_allocation.y * 2);
       child_allocation.x += GTK_MENU_ITEM (widget)->toggle_size;
       child_allocation.width -= (GTK_MENU_ITEM (widget)->toggle_size +
                                 GTK_MENU_ITEM (widget)->accelerator_size);