Index: gtknotebook.c
===================================================================
--- gtknotebook.c	(revision 17194)
+++ gtknotebook.c	(working copy)
@@ -780,6 +780,23 @@ gtk_notebook_class_init (GtkNotebookClas
                                                              G_MAXINT,
                                                              0,
                                                              GTK_PARAM_READABLE));
+  /**
+   * GtkNotebook:tabs-alignment:
+   *
+   * The "tabs-alignment" property defines the tabs alignment inside
+   * the available area. 0.0 is aligned to the left/right (depending
+   * on packing) and 1.0 is centered.
+   *
+   * Since: 2.12
+   */
+  gtk_widget_class_install_style_property (widget_class,
+                                           g_param_spec_float ("tabs-alignment",
+							       _("Tabs alignment"),
+							       _("Tabs alignment inside the available area"),
+							       0.,
+							       1.,
+							       0.,
+							       GTK_PARAM_READABLE));
 
   notebook_signals[SWITCH_PAGE] =
     g_signal_new (I_("switch_page"),
@@ -5063,7 +5080,8 @@ gtk_notebook_calculate_tabs_allocation (
 					gint         *remaining_space,
 					gint         *expanded_tabs,
 					gint          min,
-					gint          max)
+					gint          max,
+					gint          padding)
 {
   GtkWidget *widget;
   GtkContainer *container;
@@ -5091,6 +5109,12 @@ gtk_notebook_calculate_tabs_allocation (
   xthickness = widget->style->xthickness;
   ythickness = widget->style->ythickness;
 
+  if (showarrow)
+    padding = 0;
+
+  min += padding;
+  max -= padding;
+
   switch (tab_pos)
     {
     case GTK_POS_BOTTOM:
@@ -5399,11 +5423,16 @@ gtk_notebook_pages_allocate (GtkNotebook
   GList *last_child = NULL;
   gboolean showarrow = FALSE;
   gint tab_space, min, max, remaining_space;
-  gint expanded_tabs, operation;
+  gint expanded_tabs, operation, padding;
+  gfloat tabs_alignment;
 
   if (!notebook->show_tabs || !notebook->children || !notebook->cur_page)
     return;
 
+  gtk_widget_style_get (GTK_WIDGET (notebook),
+			"tabs-alignment", &tabs_alignment,
+			NULL);
+
   min = max = tab_space = remaining_space = 0;
   expanded_tabs = 1;
 
@@ -5414,16 +5443,18 @@ gtk_notebook_pages_allocate (GtkNotebook
 				     min, max, tab_space, &last_child,
 				     &expanded_tabs, &remaining_space);
 
+  padding = (remaining_space / 2) * tabs_alignment;
+
   children = notebook->first_tab;
   gtk_notebook_calculate_tabs_allocation (notebook, &children, last_child,
 					  showarrow, STEP_NEXT,
-					  &remaining_space, &expanded_tabs, min, max);
+					  &remaining_space, &expanded_tabs, min, max, padding);
   if (children && children != last_child)
     {
       children = notebook->children;
       gtk_notebook_calculate_tabs_allocation (notebook, &children, last_child,
 					      showarrow, STEP_PREV,
-					      &remaining_space, &expanded_tabs, min, max);
+					      &remaining_space, &expanded_tabs, min, max, padding);
     }
 
   children = notebook->children;
