[gtk+/client-side-decorations: 34/50] allocate bin.child's x-position and height by MAX(title height, box height)



commit 03c3614b0df6b7ab05666cb239c564aa08be2196
Author: Cody Russell <crussell canonical com>
Date:   Wed May 27 15:09:52 2009 +0200

    allocate bin.child's x-position and height by MAX(title height, box height)

 gtk/gtkwindow.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6c4ffab..e599cdb 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5225,6 +5225,7 @@ gtk_window_size_request (GtkWidget      *widget,
       if (priv->button_box && GTK_WIDGET_VISIBLE (priv->button_box))
         {
           gtk_widget_size_request (priv->button_box, &box_requisition);
+
           child_height = MAX (child_height, box_requisition.height);
         }
 
@@ -5307,14 +5308,15 @@ gtk_window_size_allocate (GtkWidget     *widget,
       if (priv->client_side_decorated && window->type != GTK_WINDOW_POPUP)
         {
           child_allocation.x = container->border_width + frame_left;
-          child_allocation.y = container->border_width + deco_allocation.height
+          child_allocation.y = container->border_width
+            + MAX (deco_allocation.height, box_allocation.height)
             + frame_top; // XXX - padding style property?
           child_allocation.width = MAX (1, ((gint)allocation->width - container->border_width * 2
                                             - frame_left - frame_right));
           child_allocation.height = MAX (1, ((gint)allocation->height - container->border_width * 2
                                              - frame_bottom
                                              - frame_top // XXX - padding style property?
-                                             - deco_allocation.height));
+                                             - MAX (deco_allocation.height, box_allocation.height)));
         }
       else
         {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]