-static void
-gtk_xpaned_size_request (GtkWidget * widget, GtkRequisition * requisition)
-{
- GtkXPaned *xpaned = GTK_XPANED (widget);
- GtkRequisition child_requisition;
-
- requisition->width = 0;
- requisition->height = 0;
-
- if (xpaned->top_left_child
- && gtk_widget_get_visible (xpaned->top_left_child))
- {
- gtk_widget_size_request (xpaned->top_left_child, &child_requisition);
-
- requisition->width = child_requisition.width;
- requisition->height = child_requisition.height;
- }
-
- if (xpaned->top_right_child
- && gtk_widget_get_visible (xpaned->top_right_child))
- {
- gtk_widget_size_request (xpaned->top_right_child, &child_requisition);
-
- requisition->width += child_requisition.width;
- requisition->height =
- MAX (requisition->height, child_requisition.height);
- }
-
- if (xpaned->bottom_left_child
- && gtk_widget_get_visible (xpaned->bottom_left_child))
- {
- gtk_widget_size_request (xpaned->bottom_left_child, &child_requisition);
-
- requisition->width = MAX (requisition->width, child_requisition.width);
- requisition->height += child_requisition.height;
- }
-
- if (xpaned->bottom_right_child
- && gtk_widget_get_visible (xpaned->bottom_right_child))
- {
- gtk_widget_size_request (xpaned->bottom_right_child,
- &child_requisition);
-
- requisition->width = child_requisition.width;
- requisition->height = child_requisition.height;
- }
-
- /* add 2 times the set border-width to the GtkXPaneds requisition */
- requisition->width += gtk_container_get_border_width (GTK_CONTAINER (xpaned)) * 2;
- requisition->height += gtk_container_get_border_width (GTK_CONTAINER (xpaned)) * 2;
-
- /* also add the handle "thickness" to GtkXPaneds width- and height-requisitions */
- if (xpaned->top_left_child
- && gtk_widget_get_visible (xpaned->top_left_child)
- && xpaned->top_right_child
- && gtk_widget_get_visible (xpaned->top_right_child)
- && xpaned->bottom_left_child
- && gtk_widget_get_visible (xpaned->bottom_left_child)
- && xpaned->bottom_right_child
- && gtk_widget_get_visible (xpaned->bottom_right_child))
- {
- gint handle_size;
-
- gtk_widget_style_get (widget, "handle-size", &handle_size, NULL);
- requisition->width += handle_size;
- requisition->height += handle_size;
- }
-}
-