Index: gtk/gtknotebook.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtknotebook.c,v
retrieving revision 1.200
diff -u -p -r1.200 gtknotebook.c
--- gtk/gtknotebook.c	22 Mar 2006 21:11:40 -0000	1.200
+++ gtk/gtknotebook.c	24 Mar 2006 14:32:32 -0000
@@ -46,6 +46,8 @@
 #define SCROLL_THRESHOLD      12
 #define DND_THRESHOLD_MULTIPLIER 4
 
+static const GtkRequisition default_arrow_size = { ARROW_SIZE, ARROW_SIZE };
+
 enum {
   SWITCH_PAGE,
   FOCUS_TAB,
@@ -772,6 +774,37 @@ gtk_notebook_class_init (GtkNotebookClas
 							     1,
 							     GTK_PARAM_READABLE));
 
+  /**
+   * GtkNotebook:arrow-size:
+   *
+   * The "arrow-size" property defines the size of the scroll arrows.
+   *
+   * Since: 2.10
+   */
+  gtk_widget_class_install_style_property (widget_class,
+                                           g_param_spec_boxed ("arrow-size",
+                                                               _("Arrow size"),
+                                                               _("Scroll arrow size"),
+                                                               GTK_TYPE_REQUISITION,
+                                                               GTK_PARAM_READABLE));
+
+  /**
+   * GtkNotebook:arrow-spacing:
+   *
+   * The "arrow-size" property defines the spacing between the scroll
+   * arrows and the tabs.
+   *
+   * Since: 2.10
+   */
+  gtk_widget_class_install_style_property (widget_class,
+                                           g_param_spec_int ("arrow-spacing",
+                                                             _("Arrow spacing"),
+                                                             _("Scroll arrow spacing"),
+                                                             0,
+                                                             G_MAXINT,
+                                                             ARROW_SPACING,
+                                                             GTK_PARAM_READABLE));
+
   notebook_signals[SWITCH_PAGE] =
     g_signal_new (I_("switch_page"),
 		  G_TYPE_FROM_CLASS (gobject_class),
@@ -1586,6 +1619,24 @@ gtk_notebook_unrealize (GtkWidget *widge
 }
 
 static void
+get_arrow_size (GtkWidget      *widget,
+                GtkRequisition *arrow_size)
+{
+  GtkRequisition *size;
+
+  gtk_widget_style_get (widget, "arrow-size", &size, NULL);
+
+  if (size)
+    {
+      *arrow_size = *size;
+      g_free (size);
+      return;
+    }
+
+  *arrow_size = default_arrow_size;
+}
+
+static void
 gtk_notebook_size_request (GtkWidget      *widget,
 			   GtkRequisition *requisition)
 {
@@ -1598,13 +1649,17 @@ gtk_notebook_size_request (GtkWidget    
   gint focus_width;
   gint tab_overlap;
   gint tab_curvature;
+  gint arrow_spacing;
+  GtkRequisition arrow_size;
 
   gtk_widget_style_get (widget,
 			"focus-line-width", &focus_width,
 			"tab-overlap", &tab_overlap,
 			"tab-curvature", &tab_curvature,
+                        "arrow-spacing", &arrow_spacing,
 			NULL);
-  
+  get_arrow_size (widget, &arrow_size);
+
   widget->requisition.width = 0;
   widget->requisition.height = 0;
 
@@ -1704,7 +1759,7 @@ gtk_notebook_size_request (GtkWidget    
 
 		  if (notebook->scrollable && vis_pages > 1 && 
 		      widget->requisition.width < tab_width)
-		    tab_height = MAX (tab_height, ARROW_SIZE);
+		    tab_height = MAX (tab_height, arrow_size.height);
 
 		  padding = 2 * (tab_curvature + focus_width +
 				 notebook->tab_hborder) - tab_overlap;
@@ -1728,7 +1783,7 @@ gtk_notebook_size_request (GtkWidget    
 
 		  if (notebook->scrollable && vis_pages > 1 &&
 		      widget->requisition.width < tab_width)
-		    tab_width = tab_max + 2 * (ARROW_SIZE + ARROW_SPACING);
+		    tab_width = tab_max + 2 * (arrow_size.width + arrow_spacing);
 
                   if (notebook->homogeneous && !notebook->scrollable)
                     widget->requisition.width = MAX (widget->requisition.width,
@@ -1747,7 +1802,8 @@ gtk_notebook_size_request (GtkWidget    
 
 		  if (notebook->scrollable && vis_pages > 1 && 
 		      widget->requisition.height < tab_height)
-		    tab_width = MAX (tab_width, ARROW_SPACING + 2 * ARROW_SIZE);
+		    tab_width = MAX (tab_width,
+                                     arrow_spacing + 2 * arrow_size.width);
 
 		  padding = 2 * (tab_curvature + focus_width +
 				 notebook->tab_vborder) - tab_overlap;
@@ -1773,7 +1829,7 @@ gtk_notebook_size_request (GtkWidget    
 
 		  if (notebook->scrollable && vis_pages > 1 && 
 		      widget->requisition.height < tab_height)
-		    tab_height = tab_max + ARROW_SIZE + ARROW_SPACING;
+		    tab_height = tab_max + arrow_size.height + arrow_spacing;
 
 		  widget->requisition.width += tab_width;
 
@@ -1995,8 +2051,12 @@ gtk_notebook_get_arrow_rect (GtkNotebook
 
   if (gtk_notebook_get_event_window_position (notebook, &event_window_pos))
     {
-      rectangle->width = ARROW_SIZE;
-      rectangle->height = ARROW_SIZE;
+      GtkRequisition arrow_size;
+
+      get_arrow_size (GTK_WIDGET (notebook), &arrow_size);
+
+      rectangle->width = arrow_size.width;
+      rectangle->height = arrow_size.height;
 
       switch (notebook->tab_pos)
 	{
@@ -4313,6 +4373,10 @@ gtk_notebook_draw_arrow (GtkNotebook    
 
   if (GTK_WIDGET_DRAWABLE (notebook))
     {
+      GtkRequisition arrow_size;
+
+      get_arrow_size (widget, &arrow_size);
+
       if (notebook->in_child == nbarrow)
         {
           if (notebook->click_child == nbarrow)
@@ -4345,7 +4409,7 @@ gtk_notebook_draw_arrow (GtkNotebook    
       gtk_paint_arrow (widget->style, widget->window, state_type, 
 		       shadow_type, NULL, widget, "notebook",
 		       arrow, TRUE, arrow_rect.x, arrow_rect.y, 
-		       ARROW_SIZE, ARROW_SIZE);
+		       arrow_size.width, arrow_size.height);
     }
 }
 
@@ -4354,6 +4418,13 @@ get_notebook_tabs_space (GtkNotebook *no
 {
   GtkWidget *widget = (GtkWidget *) notebook;
   GtkContainer *container = (GtkContainer *) notebook;
+  gint arrow_spacing;
+  GtkRequisition arrow_size;
+
+  gtk_widget_style_get (GTK_WIDGET (notebook),
+                        "arrow-spacing", &arrow_spacing,
+                        NULL);
+  get_arrow_size (GTK_WIDGET (notebook), &arrow_size);
 
   if (notebook->tab_pos == GTK_POS_TOP ||
       notebook->tab_pos == GTK_POS_BOTTOM)
@@ -4364,13 +4435,13 @@ get_notebook_tabs_space (GtkNotebook *no
       if (gtk_notebook_show_arrows (notebook))
 	{
 	  if (notebook->has_after_previous)
-	    *max -= ARROW_SPACING + ARROW_SIZE;
+	    *max -= arrow_spacing + arrow_size.width;
 	  if (notebook->has_after_next)
-	    *max -= ARROW_SPACING + ARROW_SIZE;
+	    *max -= arrow_spacing + arrow_size.width;
 	  if (notebook->has_before_previous)
-	    *min += ARROW_SPACING + ARROW_SIZE;
+	    *min += arrow_spacing + arrow_size.width;
 	  if (notebook->has_before_next)
-	    *min += ARROW_SPACING + ARROW_SIZE;
+	    *min += arrow_spacing + arrow_size.height;
 	}
     }
   else
@@ -4381,9 +4452,9 @@ get_notebook_tabs_space (GtkNotebook *no
       if (gtk_notebook_show_arrows (notebook))
 	{
 	  if (notebook->has_after_previous || notebook->has_after_next)
-	    *max -= ARROW_SPACING + ARROW_SIZE;
+	    *max -= arrow_spacing + arrow_size.height;
 	  if (notebook->has_before_previous || notebook->has_before_next)
-	    *min += ARROW_SPACING + ARROW_SIZE;
+	    *min += arrow_spacing + arrow_size.height;
 	}
     }
 }
@@ -4417,6 +4488,8 @@ gtk_notebook_pages_allocate (GtkNotebook
   gboolean is_rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL &&
 		     (tab_pos == GTK_POS_TOP || tab_pos == GTK_POS_BOTTOM));
   gint tab_overlap;
+  gint arrow_spacing;
+  GtkRequisition arrow_size;
   gint memo_x, anchor_x, anchor_y;
   gint min, max, top_y, bottom_y, left_x, right_x;
   gboolean packing_changed = FALSE;
@@ -4425,7 +4498,11 @@ gtk_notebook_pages_allocate (GtkNotebook
   if (!notebook->show_tabs || !notebook->children || !notebook->cur_page)
     return;
 
-  gtk_widget_style_get (widget, "tab-overlap", &tab_overlap, NULL);
+  gtk_widget_style_get (widget, 
+                        "tab-overlap", &tab_overlap,
+                        "arrow-spacing", &arrow_spacing,
+                        NULL);
+  get_arrow_size (widget, &arrow_size);
 
   child_allocation.x = widget->allocation.x + container->border_width;
   child_allocation.y = widget->allocation.y + container->border_width;
@@ -4488,18 +4565,18 @@ gtk_notebook_pages_allocate (GtkNotebook
 	      tab_space = allocation->width - tab_overlap -
 		page->requisition.width - 2 * container->border_width;
 	      if (notebook->has_after_previous)
-		tab_space -= ARROW_SPACING + ARROW_SIZE;
+		tab_space -= arrow_spacing + arrow_size.width;
 	      if (notebook->has_after_next)
-		tab_space -= ARROW_SPACING + ARROW_SIZE;
+		tab_space -= arrow_spacing + arrow_size.width;
 	      if (notebook->has_before_previous)
 		{
-		  tab_space -= ARROW_SPACING + ARROW_SIZE;
-		  child_allocation.x += ARROW_SPACING + ARROW_SIZE;
+		  tab_space -= arrow_spacing + arrow_size.width;
+		  child_allocation.x += arrow_spacing + arrow_size.width;
 		}
 	      if (notebook->has_before_next)
 		{
-		  tab_space -= ARROW_SPACING + ARROW_SIZE;
-		  child_allocation.x += ARROW_SPACING + ARROW_SIZE;
+		  tab_space -= arrow_spacing + arrow_size.width;
+		  child_allocation.x += arrow_spacing + arrow_size.width;
 		}
 	    }
 	  break;
@@ -4522,11 +4599,11 @@ gtk_notebook_pages_allocate (GtkNotebook
 		- tab_overlap - 2 * container->border_width
 		- page->requisition.height;
 	      if (notebook->has_after_previous || notebook->has_after_next)
-		tab_space -= ARROW_SPACING + ARROW_SIZE;
+		tab_space -= arrow_spacing + arrow_size.height;
 	      if (notebook->has_before_previous || notebook->has_before_next)
 		{
-		  tab_space -= ARROW_SPACING + ARROW_SIZE;
-		  child_allocation.y += ARROW_SPACING + ARROW_SIZE;
+		  tab_space -= arrow_spacing + arrow_size.height;
+		  child_allocation.y += arrow_spacing + arrow_size.height;
 		}
 	    }
 	  break;
@@ -4713,9 +4790,9 @@ gtk_notebook_pages_allocate (GtkNotebook
       if (showarrow) 
 	{
 	  if (notebook->has_after_previous)
-	    child_allocation.x -= ARROW_SPACING + ARROW_SIZE;
+	    child_allocation.x -= arrow_spacing + arrow_size.width;
 	  if (notebook->has_after_next)
-	    child_allocation.x -= ARROW_SPACING + ARROW_SIZE;
+	    child_allocation.x -= arrow_spacing + arrow_size.width;
 	}
      }
 
