Index: gtk/gtknotebook.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtknotebook.c,v
retrieving revision 1.191
diff -u -r1.191 gtknotebook.c
--- gtk/gtknotebook.c	23 Nov 2005 18:06:56 -0000	1.191
+++ gtk/gtknotebook.c	30 Dec 2005 07:28:18 -0000
@@ -39,7 +39,7 @@
 #include "gtkalias.h"
 
 
-#define TAB_OVERLAP         2
+#define DEFAULT_TAB_OVERLAP 2
 #define TAB_CURVATURE       1
 #define ARROW_SIZE          12
 #define ARROW_SPACING       0
@@ -587,6 +587,21 @@
 								 
                                                                    GTK_PARAM_READABLE));
 
+/**
+ * GtkNotebook:tab-overlap:
+ *
+ * The "tab-overlap" property defines size of tab overlap
+ * area.
+ */  
+  gtk_widget_class_install_style_property (widget_class,
+					   g_param_spec_int ("tab-overlap",
+							     P_("Tab overlap"),
+							     P_("Size of tab overlap area"),
+							     G_MININT,
+							     G_MAXINT,
+							     DEFAULT_TAB_OVERLAP,
+							     GTK_PARAM_READABLE));
+
   notebook_signals[SWITCH_PAGE] =
     g_signal_new (I_("switch_page"),
 		  G_TYPE_FROM_CLASS (gobject_class),
@@ -1195,8 +1210,11 @@
   gboolean switch_page = FALSE;
   gint vis_pages;
   gint focus_width;
+  gint tab_overlap;
 
-  gtk_widget_style_get (widget, "focus-line-width", &focus_width, NULL);
+  gtk_widget_style_get (widget, "focus-line-width", &focus_width,
+			"tab-overlap", &tab_overlap,
+			NULL);
   
   widget->requisition.width = 0;
   widget->requisition.height = 0;
@@ -1300,7 +1318,7 @@
 		    tab_height = MAX (tab_height, ARROW_SIZE);
 
 		  padding = 2 * (TAB_CURVATURE + focus_width +
-				 notebook->tab_hborder) - TAB_OVERLAP;
+				 notebook->tab_hborder) - tab_overlap;
 		  tab_max += padding;
 		  while (children)
 		    {
@@ -1326,10 +1344,10 @@
                   if (notebook->homogeneous && !notebook->scrollable)
                     widget->requisition.width = MAX (widget->requisition.width,
                                                      vis_pages * tab_max +
-                                                     TAB_OVERLAP);
+                                                     tab_overlap);
                   else
                     widget->requisition.width = MAX (widget->requisition.width,
-                                                     tab_width + TAB_OVERLAP);
+                                                     tab_width + tab_overlap);
 
 		  widget->requisition.height += tab_height;
 		  break;
@@ -1343,7 +1361,7 @@
 		    tab_width = MAX (tab_width, ARROW_SPACING + 2 * ARROW_SIZE);
 
 		  padding = 2 * (TAB_CURVATURE + focus_width +
-				 notebook->tab_vborder) - TAB_OVERLAP;
+				 notebook->tab_vborder) - tab_overlap;
 		  tab_max += padding;
 
 		  while (children)
@@ -1373,17 +1391,17 @@
                   if (notebook->homogeneous && !notebook->scrollable)
                     widget->requisition.height =
 		      MAX (widget->requisition.height,
-			   vis_pages * tab_max + TAB_OVERLAP);
+			   vis_pages * tab_max + tab_overlap);
                   else
                     widget->requisition.height =
 		      MAX (widget->requisition.height,
-			   tab_height + TAB_OVERLAP);
+			   tab_height + tab_overlap);
 
 		  if (!notebook->homogeneous || notebook->scrollable)
 		    vis_pages = 1;
 		  widget->requisition.height = MAX (widget->requisition.height,
 						    vis_pages * tab_max +
-						    TAB_OVERLAP);
+						    tab_overlap);
 		  break;
 		}
 	    }
@@ -3156,10 +3174,13 @@
   gboolean is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL &&
 		     (tab_pos == GTK_POS_TOP || tab_pos == GTK_POS_BOTTOM));
   gint memo_x;
+  gint tab_overlap;
 
   if (!notebook->show_tabs || !notebook->children || !notebook->cur_page)
     return;
 
+  gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
+
   child_allocation.x = widget->allocation.x + container->border_width;
   child_allocation.y = widget->allocation.y + container->border_width;
 
@@ -3212,12 +3233,12 @@
 		tab_space += page->requisition.width;
 	    }
 	  if (tab_space >
-	      allocation->width - 2 * container->border_width - TAB_OVERLAP) 
+	      allocation->width - 2 * container->border_width - tab_overlap) 
 	    {
 	      showarrow = TRUE;
 	      page = focus_tab->data; 
 
-	      tab_space = allocation->width - TAB_OVERLAP -
+	      tab_space = allocation->width - tab_overlap -
 		page->requisition.width - 2 * container->border_width;
 	      if (notebook->has_after_previous)
 		tab_space -= ARROW_SPACING + ARROW_SIZE;
@@ -3246,12 +3267,12 @@
 		tab_space += page->requisition.height;
 	    }
 	  if (tab_space >
-	      (allocation->height - 2 * container->border_width - TAB_OVERLAP))
+	      (allocation->height - 2 * container->border_width - tab_overlap))
 	    {
 	      showarrow = TRUE;
 	      page = focus_tab->data; 
 	      tab_space = allocation->height
-		- TAB_OVERLAP - 2 * container->border_width
+		- tab_overlap - 2 * container->border_width
 		- page->requisition.height;
 	      if (notebook->has_after_previous || notebook->has_after_next)
 		tab_space -= ARROW_SPACING + ARROW_SIZE;
@@ -3426,7 +3447,7 @@
 	    }
 	  tab_space -= allocation->height;
 	}
-      tab_space += 2 * container->border_width + TAB_OVERLAP;
+      tab_space += 2 * container->border_width + tab_overlap;
       tab_space *= -1;
       notebook->first_tab = gtk_notebook_search_page (notebook, NULL,
 						      STEP_NEXT, TRUE);
@@ -3477,14 +3498,14 @@
 	case GTK_POS_TOP:
 	case GTK_POS_BOTTOM:
 	  child_allocation.width = (page->requisition.width +
-				    TAB_OVERLAP + delta);
+				    tab_overlap + delta);
           if (is_rtl)
 	      child_allocation.x -= child_allocation.width;
 	  break;
 	case GTK_POS_LEFT:
 	case GTK_POS_RIGHT:
 	  child_allocation.height = (page->requisition.height +
-				     TAB_OVERLAP + delta);
+				     tab_overlap + delta);
 	  break;
 	}
 
@@ -3495,13 +3516,13 @@
 	case GTK_POS_TOP:
 	case GTK_POS_BOTTOM:
           if (!is_rtl)
-	     child_allocation.x += child_allocation.width - TAB_OVERLAP;
+	     child_allocation.x += child_allocation.width - tab_overlap;
           else
-             child_allocation.x += TAB_OVERLAP;
+             child_allocation.x += tab_overlap;
 	  break;
 	case GTK_POS_LEFT:
 	case GTK_POS_RIGHT:
-	  child_allocation.y += child_allocation.height - TAB_OVERLAP;
+	  child_allocation.y += child_allocation.height - tab_overlap;
 	  break;
 	}
 
@@ -3551,14 +3572,14 @@
 	    case GTK_POS_TOP:
 	    case GTK_POS_BOTTOM:
 	      child_allocation.width = (page->requisition.width +
-					TAB_OVERLAP + delta);
+					tab_overlap + delta);
               if (!is_rtl)
 	         child_allocation.x -= child_allocation.width;
 	      break;
 	    case GTK_POS_LEFT:
 	    case GTK_POS_RIGHT:
 	      child_allocation.height = (page->requisition.height +
-					 TAB_OVERLAP + delta);
+					 tab_overlap + delta);
 	      child_allocation.y -= child_allocation.height;
 	      break;
 	    }
@@ -3570,13 +3591,13 @@
 	    case GTK_POS_TOP:
 	    case GTK_POS_BOTTOM:
               if (!is_rtl)
-	         child_allocation.x += TAB_OVERLAP;
+	         child_allocation.x += tab_overlap;
               else
-                 child_allocation.x += child_allocation.width - TAB_OVERLAP;
+                 child_allocation.x += child_allocation.width - tab_overlap;
 	      break;
 	    case GTK_POS_LEFT:
 	    case GTK_POS_RIGHT:
-	      child_allocation.y += TAB_OVERLAP;
+	      child_allocation.y += tab_overlap;
 	      break;
 	    }
 
