[gtk+] notebook: Respect padding when computing tabs for left/right



commit 409143637f80209f681bc0926f435be29a51de14
Author: Benjamin Otte <otte redhat com>
Date:   Fri Apr 29 09:38:23 2011 +0200

    notebook: Respect padding when computing tabs for left/right
    
    This mirrors the top/bottom code

 gtk/gtknotebook.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 61e3079..2d4530c 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -6177,11 +6177,16 @@ gtk_notebook_page_allocate (GtkNotebook     *notebook,
            */
           if (page != priv->cur_page && tab_overlap > tab_curvature)
             {
-              child_allocation.height -= tab_overlap - tab_curvature;
-
               if (gtk_notebook_page_num (notebook, page->child) >
                   gtk_notebook_page_num (notebook, priv->cur_page->child))
-                child_allocation.y += tab_overlap - tab_curvature;
+                {
+                  child_allocation.y += tab_overlap - tab_curvature - tab_padding.top;
+                  child_allocation.height -= tab_overlap - tab_curvature - tab_padding.top;
+                }
+              else
+                {
+                  child_allocation.height -= tab_overlap - tab_curvature - tab_padding.bottom;
+                }
             }
         }
       else



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