Index: gtk/gtkprogressbar.c
===================================================================
--- gtk/gtkprogressbar.c	(revision 21028)
+++ gtk/gtkprogressbar.c	(working copy)
@@ -37,10 +37,10 @@
 #include "gtkalias.h"
 
 
-#define MIN_HORIZONTAL_BAR_WIDTH   150
-#define MIN_HORIZONTAL_BAR_HEIGHT  20
-#define MIN_VERTICAL_BAR_WIDTH     22
-#define MIN_VERTICAL_BAR_HEIGHT    80
+#define MIN_HORIZONTAL_BAR_WIDTH   GDK_UNIT_ONE_TWELFTH_EM(150)
+#define MIN_HORIZONTAL_BAR_HEIGHT  GDK_UNIT_ONE_TWELFTH_EM(20)
+#define MIN_VERTICAL_BAR_WIDTH     GDK_UNIT_ONE_TWELFTH_EM(22)
+#define MIN_VERTICAL_BAR_HEIGHT    GDK_UNIT_ONE_TWELFTH_EM(80)
 
 enum {
   PROP_0,
@@ -210,17 +210,17 @@ gtk_progress_bar_class_init (GtkProgressBarClass *
 						      PANGO_ELLIPSIZE_NONE,
                                                       GTK_PARAM_READWRITE));
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("xspacing",
-                                                             P_("XSpacing"),
-                                                             P_("Extra spacing applied to the width of a progress bar."),
-                                                             0, G_MAXINT, 7,
-                                                             G_PARAM_READWRITE));
+                                           gdk_param_spec_unit ("xspacing",
+                                                                P_("XSpacing"),
+                                                                P_("Extra spacing applied to the width of a progress bar."),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (7),
+                                                                G_PARAM_READWRITE));
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("yspacing",
-                                                             P_("YSpacing"),
-                                                             P_("Extra spacing applied to the height of a progress bar."),
-                                                             0, G_MAXINT, 7,
-                                                             G_PARAM_READWRITE));
+                                           gdk_param_spec_unit ("yspacing",
+                                                                P_("YSpacing"),
+                                                                P_("Extra spacing applied to the height of a progress bar."),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (7),
+                                                                G_PARAM_READWRITE));
 
   /**
    * GtkProgressBar:min-horizontal-bar-width:
@@ -230,11 +230,11 @@ gtk_progress_bar_class_init (GtkProgressBarClass *
    * Since: 2.14
    */
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("min-horizontal-bar-width",
-                                                             P_("Min horizontal bar width"),
-                                                             P_("The minimum horizontal width of the progress bar"),
-                                                             1, G_MAXINT, MIN_HORIZONTAL_BAR_WIDTH,
-                                                             G_PARAM_READWRITE));
+                                           gdk_param_spec_unit ("min-horizontal-bar-width",
+                                                                P_("Min horizontal bar width"),
+                                                                P_("The minimum horizontal width of the progress bar"),
+                                                                MIN_HORIZONTAL_BAR_WIDTH,
+                                                                G_PARAM_READWRITE));
   /**
    * GtkProgressBar:min-horizontal-bar-height:
    *
@@ -243,11 +243,11 @@ gtk_progress_bar_class_init (GtkProgressBarClass *
    * Since: 2.14
    */
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("min-horizontal-bar-height",
-                                                             P_("Min horizontal bar height"),
-                                                             P_("Minimum horizontal height of the progress bar"),
-                                                             1, G_MAXINT, MIN_HORIZONTAL_BAR_HEIGHT,
-                                                             G_PARAM_READWRITE));
+                                           gdk_param_spec_unit ("min-horizontal-bar-height",
+                                                                P_("Min horizontal bar height"),
+                                                                P_("Minimum horizontal height of the progress bar"),
+                                                                MIN_HORIZONTAL_BAR_HEIGHT,
+                                                                G_PARAM_READWRITE));
   /**
    * GtkProgressBar:min-vertical-bar-width:
    *
@@ -256,11 +256,11 @@ gtk_progress_bar_class_init (GtkProgressBarClass *
    * Since: 2.14
    */
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("min-vertical-bar-width",
-                                                             P_("Min vertical bar width"),
-                                                             P_("The minimum vertical width of the progress bar"),
-                                                             1, G_MAXINT, MIN_VERTICAL_BAR_WIDTH,
-                                                             G_PARAM_READWRITE));
+                                           gdk_param_spec_unit ("min-vertical-bar-width",
+                                                                P_("Min vertical bar width"),
+                                                                P_("The minimum vertical width of the progress bar"),
+                                                                MIN_VERTICAL_BAR_WIDTH,
+                                                                G_PARAM_READWRITE));
   /**
    * GtkProgressBar:min-vertical-bar-height:
    *
@@ -269,11 +269,11 @@ gtk_progress_bar_class_init (GtkProgressBarClass *
    * Since: 2.14
    */
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("min-vertical-bar-height",
-                                                             P_("Min vertical bar height"),
-                                                             P_("The minimum vertical height of the progress bar"),
-                                                             1, G_MAXINT, MIN_VERTICAL_BAR_HEIGHT,
-                                                             G_PARAM_READWRITE));
+                                           gdk_param_spec_unit ("min-vertical-bar-height",
+                                                                P_("Min vertical bar height"),
+                                                                P_("The minimum vertical height of the progress bar"),
+                                                                MIN_VERTICAL_BAR_HEIGHT,
+                                                                G_PARAM_READWRITE));
 }
 
 static void
Index: gtk/gtkfilechooserdialog.c
===================================================================
--- gtk/gtkfilechooserdialog.c	(revision 21028)
+++ gtk/gtkfilechooserdialog.c	(working copy)
@@ -89,9 +89,9 @@ gtk_file_chooser_dialog_init (GtkFileChooserDialog
   dialog->priv->response_requested = FALSE;
 
   gtk_dialog_set_has_separator (fc_dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (fc_dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (fc_dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (fc_dialog->action_area), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (fc_dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (fc_dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (fc_dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
 
   /* We do a signal connection here rather than overriding the method in
    * class_init because GtkDialog::response is a RUN_LAST signal.  We want *our*
@@ -279,7 +279,7 @@ gtk_file_chooser_dialog_constructor (GType
   g_signal_connect (priv->widget, "response-requested",
 		    G_CALLBACK (file_chooser_widget_response_requested), object);
 
-  gtk_container_set_border_width (GTK_CONTAINER (priv->widget), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (priv->widget), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), priv->widget, TRUE, TRUE, 0);
 
   gtk_widget_show (priv->widget);
Index: gtk/gtkwidget.c
===================================================================
--- gtk/gtkwidget.c	(revision 21028)
+++ gtk/gtkwidget.c	(working copy)
@@ -128,6 +128,7 @@ enum {
   KEYNAV_FAILED,
   DRAG_FAILED,
   DAMAGE_EVENT,
+  UNIT_CHANGED,
   LAST_SIGNAL
 };
 
@@ -276,8 +277,8 @@ static void             gtk_widget_buildable_parse
 
      
 static void gtk_widget_set_usize_internal (GtkWidget *widget,
-					   gint       width,
-					   gint       height);
+					   GdkUnit    width,
+					   GdkUnit    height);
 static void gtk_widget_get_draw_rectangle (GtkWidget    *widget,
 					   GdkRectangle *rect);
 
@@ -494,22 +495,18 @@ gtk_widget_class_init (GtkWidgetClass *klass)
 
   g_object_class_install_property (gobject_class,
 				   PROP_WIDTH_REQUEST,
-				   g_param_spec_int ("width-request",
- 						     P_("Width request"),
- 						     P_("Override for width request of the widget, or -1 if natural request should be used"),
- 						     -1,
- 						     G_MAXINT,
- 						     -1,
- 						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("width-request",
+                                                        P_("Width request"),
+                                                        P_("Override for width request of the widget, or -1 if natural request should be used"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
 				   PROP_HEIGHT_REQUEST,
-				   g_param_spec_int ("height-request",
- 						     P_("Height request"),
- 						     P_("Override for height request of the widget, or -1 if natural request should be used"),
- 						     -1,
- 						     G_MAXINT,
- 						     -1,
- 						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("height-request",
+                                                        P_("Height request"),
+                                                        P_("Override for height request of the widget, or -1 if natural request should be used"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
 				   PROP_VISIBLE,
 				   g_param_spec_boolean ("visible",
@@ -1094,6 +1091,24 @@ gtk_widget_class_init (GtkWidgetClass *klass)
 		  G_TYPE_NONE, 0);
 
   /**
+   * GtkWidget::unit-changed:
+   * @widget: the object on which the signal is emitted
+   *
+   * The ::unit-changed signal is emitted when the units
+   * change. @widget should recompute internal pixel sizes.
+   *
+   * Since: 2.14
+   */
+  widget_signals[UNIT_CHANGED] =
+    g_signal_new (I_("unit_changed"),
+		  G_TYPE_FROM_CLASS (gobject_class),
+		  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+		  G_STRUCT_OFFSET (GtkWidgetClass, unit_changed),
+		  NULL, NULL,
+		  _gtk_marshal_VOID__VOID,
+		  G_TYPE_NONE, 0);
+
+  /**
    * GtkWidget::keynav-failed:
    * @widget: the object which received the signal
    * @direction: the direction of movement
@@ -2211,11 +2226,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
 								 GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (klass,
-					   g_param_spec_int ("focus-line-width",
-							     P_("Focus linewidth"),
-							     P_("Width, in pixels, of the focus indicator line"),
-							     0, G_MAXINT, 1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("focus-line-width",
+                                                                P_("Focus linewidth"),
+                                                                P_("Width, in pixels, of the focus indicator line"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (klass,
 					   g_param_spec_string ("focus-line-pattern",
@@ -2224,11 +2239,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
 								"\1\1",
 								GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (klass,
-					   g_param_spec_int ("focus-padding",
-							     P_("Focus padding"),
-							     P_("Width, in pixels, between focus indicator and the widget 'box'"),
-							     0, G_MAXINT, 1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("focus-padding",
+                                                                P_("Focus padding"),
+                                                                P_("Width, in pixels, between focus indicator and the widget 'box'"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (klass,
 					   g_param_spec_boxed ("cursor-color",
 							       P_("Cursor color"),
@@ -2315,11 +2330,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
    * Since: 2.10
    */
   gtk_widget_class_install_style_property (klass,
-                                           g_param_spec_int ("separator-width",
-                                                             P_("Separator Width"),
-                                                             P_("The width of separators if wide-separators is TRUE"),
-                                                             0, G_MAXINT, 0,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("separator-width",
+                                                                P_("Separator Width"),
+                                                                P_("The width of separators if wide-separators is TRUE"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkWidget:separator-height:
@@ -2330,11 +2345,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
    * Since: 2.10
    */
   gtk_widget_class_install_style_property (klass,
-                                           g_param_spec_int ("separator-height",
-                                                             P_("Separator Height"),
-                                                             P_("The height of separators if \"wide-separators\" is TRUE"),
-                                                             0, G_MAXINT, 0,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("separator-height",
+                                                                P_("Separator Height"),
+                                                                P_("The height of separators if \"wide-separators\" is TRUE"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkWidget:scroll-arrow-hlength:
@@ -2345,11 +2360,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
    * Since: 2.10
    */
   gtk_widget_class_install_style_property (klass,
-                                           g_param_spec_int ("scroll-arrow-hlength",
-                                                             P_("Horizontal Scroll Arrow Length"),
-                                                             P_("The length of horizontal scroll arrows"),
-                                                             1, G_MAXINT, 16,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("scroll-arrow-hlength",
+                                                                P_("Horizontal Scroll Arrow Length"),
+                                                                P_("The length of horizontal scroll arrows"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (16),
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkWidget:scroll-arrow-vlength:
@@ -2360,11 +2375,11 @@ gtk_widget_class_init (GtkWidgetClass *klass)
    * Since: 2.10
    */
   gtk_widget_class_install_style_property (klass,
-                                           g_param_spec_int ("scroll-arrow-vlength",
-                                                             P_("Vertical Scroll Arrow Length"),
-                                                             P_("The length of vertical scroll arrows"),
-                                                             1, G_MAXINT, 16,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("scroll-arrow-vlength",
+                                                                P_("Vertical Scroll Arrow Length"),
+                                                                P_("The length of vertical scroll arrows"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (16),
+                                                                GTK_PARAM_READABLE));
 }
 
 static void
@@ -2406,10 +2421,10 @@ gtk_widget_set_property (GObject         *object,
       gtk_container_add (GTK_CONTAINER (g_value_get_object (value)), widget);
       break;
     case PROP_WIDTH_REQUEST:
-      gtk_widget_set_usize_internal (widget, g_value_get_int (value), -2);
+      gtk_widget_set_usize_internal (widget, gdk_value_get_unit (value), -2);
       break;
     case PROP_HEIGHT_REQUEST:
-      gtk_widget_set_usize_internal (widget, -2, g_value_get_int (value));
+      gtk_widget_set_usize_internal (widget, -2, gdk_value_get_unit (value));
       break;
     case PROP_VISIBLE:
       if (g_value_get_boolean (value))
@@ -2549,14 +2564,14 @@ gtk_widget_get_property (GObject         *object,
       {
         int w;
         gtk_widget_get_size_request (widget, &w, NULL);
-        g_value_set_int (value, w);
+        gdk_value_set_unit (value, w);
       }
       break;
     case PROP_HEIGHT_REQUEST:
       {
         int h;
         gtk_widget_get_size_request (widget, NULL, &h);
-        g_value_set_int (value, h);
+        gdk_value_set_unit (value, h);
       }
       break;
     case PROP_VISIBLE:
@@ -6269,6 +6284,39 @@ _gtk_widget_propagate_composited_changed (GtkWidge
   propagate_composited_changed (widget, NULL);
 }
 
+static void
+propagate_unit_changed (GtkWidget *widget,
+                        gpointer dummy)
+{
+  if (GTK_IS_CONTAINER (widget))
+    {
+      gtk_container_forall (GTK_CONTAINER (widget),
+			    propagate_unit_changed,
+			    NULL);
+    }
+  g_signal_emit (widget, widget_signals[UNIT_CHANGED], 0);
+}
+
+static void
+propagate_resize (GtkWidget *widget,
+                  gpointer dummy)
+{
+  gtk_widget_queue_resize (widget);
+  if (GTK_IS_CONTAINER (widget))
+    {
+      gtk_container_forall (GTK_CONTAINER (widget),
+			    propagate_resize,
+			    NULL);
+    }
+}
+
+void
+_gtk_widget_propagate_unit_changed (GtkWidget *widget)
+{
+  propagate_unit_changed (widget, NULL);
+  propagate_resize (widget, NULL);
+}
+
 /**
  * _gtk_widget_propagate_screen_changed:
  * @widget: a #GtkWidget
@@ -6282,7 +6330,6 @@ _gtk_widget_propagate_screen_changed (GtkWidget
 				      GdkScreen    *previous_screen)
 {
   HierarchyChangedInfo info;
-
   info.previous_screen = previous_screen;
   info.new_screen = gtk_widget_get_screen (widget);
 
@@ -7012,8 +7059,8 @@ gtk_widget_set_uposition (GtkWidget *widget,
 
 static void
 gtk_widget_set_usize_internal (GtkWidget *widget,
-			       gint       width,
-			       gint       height)
+			       GdkUnit    width,
+			       GdkUnit    height)
 {
   GtkWidgetAuxInfo *aux_info;
   gboolean changed = FALSE;
@@ -7069,8 +7116,8 @@ gtk_widget_set_usize_internal (GtkWidget *widget,
  **/
 void
 gtk_widget_set_usize (GtkWidget *widget,
-		      gint	 width,
-		      gint	 height)
+		      GdkUnit	 width,
+		      GdkUnit	 height)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
   
@@ -7115,8 +7162,8 @@ gtk_widget_set_usize (GtkWidget *widget,
  **/
 void
 gtk_widget_set_size_request (GtkWidget *widget,
-                             gint       width,
-                             gint       height)
+                             GdkUnit    width,
+                             GdkUnit    height)
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
   g_return_if_fail (width >= -1);
@@ -7157,6 +7204,34 @@ gtk_widget_get_size_request (GtkWidget *widget,
   aux_info = _gtk_widget_get_aux_info (widget, FALSE);
 
   if (width)
+    *width = aux_info ? GDK_UNIT_TO_PIXEL (aux_info->width) : -1;
+
+  if (height)
+    *height = aux_info ? GDK_UNIT_TO_PIXEL (aux_info->height) : -1;
+}
+
+/**
+ * gtk_widget_get_size_request_unit:
+ * @widget: a #GtkWidget
+ * @width: return location for width, or %NULL
+ * @height: return location for height, or %NULL
+ *
+ * Like gtk_widget_get_size_request() but preserves the unit.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_widget_get_size_request_unit (GtkWidget *widget,
+                                  GdkUnit   *width,
+                                  GdkUnit   *height)
+{
+  GtkWidgetAuxInfo *aux_info;
+
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+
+  aux_info = _gtk_widget_get_aux_info (widget, FALSE);
+
+  if (width)
     *width = aux_info ? aux_info->width : -1;
 
   if (height)
@@ -8960,18 +9035,38 @@ gtk_widget_style_get_property (GtkWidget   *widget
   else
     {
       const GValue *peek_value;
+      GValue unit_val = {0, };
+      GValue uunit_val = {0, };
+      const GValue *value_to_use;
 
       peek_value = _gtk_style_peek_property_value (widget->style,
 						   G_OBJECT_TYPE (widget),
 						   pspec,
 						   (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
       
+      if (GDK_IS_PARAM_SPEC_UNIT (pspec))
+        {
+          g_value_init (&unit_val, G_TYPE_INT);
+          gdk_value_set_unit (&unit_val, GDK_UNIT_TO_PIXEL (g_value_get_int (peek_value)));
+          value_to_use = &unit_val;
+        }
+      else if (GDK_IS_PARAM_SPEC_UUNIT (pspec))
+        {
+          g_value_init (&uunit_val, G_TYPE_UINT);
+          gdk_value_set_unit (&uunit_val, GDK_UNIT_TO_PIXEL (g_value_get_int (peek_value)));
+          value_to_use = &uunit_val;
+        }
+      else
+        {
+          value_to_use = peek_value;
+        }
+
       /* auto-conversion of the caller's value type
        */
       if (G_VALUE_TYPE (value) == G_PARAM_SPEC_VALUE_TYPE (pspec))
-	g_value_copy (peek_value, value);
+	g_value_copy (value_to_use, value);
       else if (g_value_type_transformable (G_PARAM_SPEC_VALUE_TYPE (pspec), G_VALUE_TYPE (value)))
-	g_value_transform (peek_value, value);
+	g_value_transform (value_to_use, value);
       else
 	g_warning ("can't retrieve style property `%s' of type `%s' as value of type `%s'",
 		   pspec->name,
@@ -9025,10 +9120,27 @@ gtk_widget_style_get_valist (GtkWidget   *widget,
       /* style pspecs are always readable so we can spare that check here */
 
       peek_value = _gtk_style_peek_property_value (widget->style,
-						   G_OBJECT_TYPE (widget),
-						   pspec,
-						   (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
-      G_VALUE_LCOPY (peek_value, var_args, 0, &error);
+                                                   G_OBJECT_TYPE (widget),
+                                                   pspec,
+                                                   (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
+      if (GDK_IS_PARAM_SPEC_UNIT (pspec))
+        {
+          GValue unit_val = {0, };
+          g_value_init (&unit_val, G_TYPE_INT);
+          gdk_value_set_unit (&unit_val, GDK_UNIT_TO_PIXEL (g_value_get_int (peek_value)));
+          G_VALUE_LCOPY (&unit_val, var_args, 0, &error);
+        }
+      else if (GDK_IS_PARAM_SPEC_UUNIT (pspec))
+        {
+          GValue uunit_val = {0, };
+          g_value_init (&uunit_val, G_TYPE_UINT);
+          gdk_value_set_unit (&uunit_val, GDK_UNIT_TO_PIXEL (g_value_get_int (peek_value)));
+          G_VALUE_LCOPY (&uunit_val, var_args, 0, &error);
+        }
+      else
+        {
+          G_VALUE_LCOPY (peek_value, var_args, 0, &error);
+        }
       if (error)
 	{
 	  g_warning ("%s: %s", G_STRLOC, error);
@@ -9050,7 +9162,9 @@ gtk_widget_style_get_valist (GtkWidget   *widget,
  *   return the property values, starting with the location for 
  *   @first_property_name, terminated by %NULL.
  *
- * Gets the values of a multiple style properties of @widget.
+ * Gets the values of a multiple style properties of @widget. All
+ * #GdkUnit properties will be converted to pixels; use
+ * gtk_widget_style_get_unit() to preserve the units.
  */
 void
 gtk_widget_style_get (GtkWidget   *widget,
@@ -9067,6 +9181,152 @@ gtk_widget_style_get (GtkWidget   *widget,
 }
 
 /**
+ * gtk_widget_style_get_property_unit:
+ * @widget: a #GtkWidget
+ * @property_name: the name of a style property
+ * @value: location to return the property value 
+ *
+ * Like gtk_widget_style_get_property() but preserves units.
+ *
+ * Since: 2.14
+ */
+void
+gtk_widget_style_get_property_unit (GtkWidget   *widget,
+                                    const gchar *property_name,
+                                    GValue      *value)
+{
+  GParamSpec *pspec;
+
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+  g_return_if_fail (property_name != NULL);
+  g_return_if_fail (G_IS_VALUE (value));
+
+  g_object_ref (widget);
+  pspec = g_param_spec_pool_lookup (style_property_spec_pool,
+				    property_name,
+				    G_OBJECT_TYPE (widget),
+				    TRUE);
+  if (!pspec)
+    g_warning ("%s: widget class `%s' has no property named `%s'",
+	       G_STRLOC,
+	       G_OBJECT_TYPE_NAME (widget),
+	       property_name);
+  else
+    {
+      const GValue *peek_value;
+
+      peek_value = _gtk_style_peek_property_value (widget->style,
+						   G_OBJECT_TYPE (widget),
+						   pspec,
+						   (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
+      
+      /* auto-conversion of the caller's value type
+       */
+      if (G_VALUE_TYPE (value) == G_PARAM_SPEC_VALUE_TYPE (pspec))
+	g_value_copy (peek_value, value);
+      else if (g_value_type_transformable (G_PARAM_SPEC_VALUE_TYPE (pspec), G_VALUE_TYPE (value)))
+	g_value_transform (peek_value, value);
+      else
+	g_warning ("can't retrieve style property `%s' of type `%s' as value of type `%s'",
+		   pspec->name,
+		   g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)),
+		   G_VALUE_TYPE_NAME (value));
+    }
+  g_object_unref (widget);
+}
+
+/**
+ * gtk_widget_style_get_unit_valist:
+ * @widget: a #GtkWidget
+ * @first_property_name: the name of the first property to get
+ * @var_args: a <type>va_list</type> of pairs of property names and
+ *     locations to return the property values, starting with the location
+ *     for @first_property_name.
+ *
+ * Non-vararg variant of gtk_widget_style_get_unit(). Used
+ * primarily by language bindings.
+ *
+ * Since: 2.14
+ */
+void
+gtk_widget_style_get_unit_valist (GtkWidget   *widget,
+                                  const gchar *first_property_name,
+                                  va_list      var_args)
+{
+  const gchar *name;
+
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+
+  g_object_ref (widget);
+
+  name = first_property_name;
+  while (name)
+    {
+      const GValue *peek_value;
+      GParamSpec *pspec;
+      gchar *error;
+
+      pspec = g_param_spec_pool_lookup (style_property_spec_pool,
+					name,
+					G_OBJECT_TYPE (widget),
+					TRUE);
+      if (!pspec)
+	{
+	  g_warning ("%s: widget class `%s' has no property named `%s'",
+		     G_STRLOC,
+		     G_OBJECT_TYPE_NAME (widget),
+		     name);
+	  break;
+	}
+      /* style pspecs are always readable so we can spare that check here */
+
+      peek_value = _gtk_style_peek_property_value (widget->style,
+						   G_OBJECT_TYPE (widget),
+						   pspec,
+						   (GtkRcPropertyParser) g_param_spec_get_qdata (pspec, quark_property_parser));
+      G_VALUE_LCOPY (peek_value, var_args, 0, &error);
+
+      if (error)
+	{
+	  g_warning ("%s: %s", G_STRLOC, error);
+	  g_free (error);
+	  break;
+	}
+
+      name = va_arg (var_args, gchar*);
+    }
+
+  g_object_unref (widget);
+}
+
+/**
+ * gtk_widget_style_get_unit:
+ * @widget: a #GtkWidget
+ * @first_property_name: the name of the first property to get
+ * @Varargs: pairs of property names and locations to 
+ *   return the property values, starting with the location for 
+ *   @first_property_name, terminated by %NULL.
+ *
+ * Like gtk_widget_stylet_get() but preserves all #GdkUnit values
+ * rather than using GDK_UNIT_TO_PIXEL().
+ *
+ * Since: 2.14
+ */
+void
+gtk_widget_style_get_unit (GtkWidget   *widget,
+                           const gchar *first_property_name,
+                           ...)
+{
+  va_list var_args;
+
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+
+  va_start (var_args, first_property_name);
+  gtk_widget_style_get_unit_valist (widget, first_property_name, var_args);
+  va_end (var_args);
+}
+
+/**
  * gtk_widget_path:
  * @widget: a #GtkWidget
  * @path_length: location to store length of the path, or %NULL
Index: gtk/gtksizegroup.c
===================================================================
--- gtk/gtksizegroup.c	(revision 21028)
+++ gtk/gtksizegroup.c	(working copy)
@@ -597,14 +597,14 @@ get_base_dimension (GtkWidget        *widget,
   if (mode == GTK_SIZE_GROUP_HORIZONTAL)
     {
       if (aux_info && aux_info->width > 0)
-	return aux_info->width;
+	return GDK_UNIT_TO_PIXEL (aux_info->width);
       else
 	return widget->requisition.width;
     }
   else
     {
       if (aux_info && aux_info->height > 0)
-	return aux_info->height;
+	return GDK_UNIT_TO_PIXEL (aux_info->height);
       else
 	return widget->requisition.height;
     }
@@ -751,9 +751,9 @@ get_fast_child_requisition (GtkWidget      *widget
   if (aux_info)
     {
       if (aux_info->width > 0)
-	requisition->width = aux_info->width;
+	requisition->width = GDK_UNIT_TO_PIXEL (aux_info->width);
       if (aux_info && aux_info->height > 0)
-	requisition->height = aux_info->height;
+	requisition->height = GDK_UNIT_TO_PIXEL (aux_info->height);
     }
 }
 
Index: gtk/gtkwidget.h
===================================================================
--- gtk/gtkwidget.h	(revision 21028)
+++ gtk/gtkwidget.h	(working copy)
@@ -425,8 +425,10 @@ struct _GtkWidgetClass
    *                             GdkEventExpose *event);
    */
 
+  /* subclasses MUST chain up to their parent class */
+  void         (* unit_changed) (GtkWidget *widget);
+
   /* Padding for future expansion */
-  void (*_gtk_reserved5) (void);
   void (*_gtk_reserved6) (void);
   void (*_gtk_reserved7) (void);
 };
@@ -435,8 +437,8 @@ struct _GtkWidgetAuxInfo
 {
   gint x;
   gint y;
-  gint width;
-  gint height;
+  GdkUnit width;
+  GdkUnit height;
   guint x_set : 1;
   guint y_set : 1;
 };
@@ -585,18 +587,21 @@ gboolean   gtk_widget_keynav_failed       (GtkWidg
 void       gtk_widget_error_bell          (GtkWidget           *widget);
 
 void       gtk_widget_set_size_request    (GtkWidget           *widget,
-                                           gint                 width,
-                                           gint                 height);
+                                           GdkUnit              width,
+                                           GdkUnit              height);
 void       gtk_widget_get_size_request    (GtkWidget           *widget,
                                            gint                *width,
                                            gint                *height);
+void       gtk_widget_get_size_request_unit (GtkWidget           *widget,
+                                             GdkUnit             *width,
+                                             GdkUnit             *height);
 #ifndef GTK_DISABLE_DEPRECATED
 void	   gtk_widget_set_uposition	  (GtkWidget	       *widget,
 					   gint			x,
 					   gint			y);
 void	   gtk_widget_set_usize		  (GtkWidget	       *widget,
-					   gint			width,
-					   gint			height);
+					   GdkUnit		width,
+					   GdkUnit		height);
 #endif
 
 void	   gtk_widget_set_events	  (GtkWidget	       *widget,
@@ -744,7 +749,17 @@ void gtk_widget_style_get          (GtkWidget
 				    const gchar    *first_property_name,
 				    ...) G_GNUC_NULL_TERMINATED;
 
+void gtk_widget_style_get_property_unit (GtkWidget	     *widget,
+                                         const gchar    *property_name,
+                                         GValue	     *value);
+void gtk_widget_style_get_unit_valist   (GtkWidget	     *widget,
+                                         const gchar    *first_property_name,
+                                         va_list         var_args);
+void gtk_widget_style_get_unit (GtkWidget	     *widget,
+                                const gchar    *first_property_name,
+                                ...) G_GNUC_NULL_TERMINATED;
 
+
 /* Set certain default values to be used at widget creation time.
  */
 void	     gtk_widget_set_default_colormap (GdkColormap *colormap);
@@ -832,6 +847,7 @@ void              _gtk_widget_propagate_hierarchy_
 void              _gtk_widget_propagate_screen_changed    (GtkWidget    *widget,
 							   GdkScreen    *previous_screen);
 void		  _gtk_widget_propagate_composited_changed (GtkWidget    *widget);
+void              _gtk_widget_propagate_unit_changed      (GtkWidget    *widget);
 
 void	   _gtk_widget_set_pointer_window  (GtkWidget      *widget,
 					    GdkWindow      *pointer_window);
Index: gtk/gtkrange.c
===================================================================
--- gtk/gtkrange.c	(revision 21028)
+++ gtk/gtkrange.c	(working copy)
@@ -427,29 +427,23 @@ gtk_range_class_init (GtkRangeClass *class)
                                                         GTK_PARAM_READWRITE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("slider-width",
-							     P_("Slider Width"),
-							     P_("Width of scrollbar or scale thumb"),
-							     0,
-							     G_MAXINT,
-							     14,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("slider-width",
+                                                                P_("Slider Width"),
+                                                                P_("Width of scrollbar or scale thumb"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (14),
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("trough-border",
-                                                             P_("Trough Border"),
-                                                             P_("Spacing between thumb/steppers and outer trough bevel"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             1,
-                                                             GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("trough-border",
+                                                                P_("Trough Border"),
+                                                                P_("Spacing between thumb/steppers and outer trough bevel"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("stepper-size",
-							     P_("Stepper Size"),
-							     P_("Length of step buttons at ends"),
-							     0,
-							     G_MAXINT,
-							     14,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("stepper-size",
+                                                                P_("Stepper Size"),
+                                                                P_("Length of step buttons at ends"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (14),
+                                                                GTK_PARAM_READABLE));
   /**
    * GtkRange:stepper-spacing:
    *
@@ -459,29 +453,23 @@ gtk_range_class_init (GtkRangeClass *class)
    * stepper-spacing won't have any effect if there are no steppers.
    */
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("stepper-spacing",
-							     P_("Stepper Spacing"),
-							     P_("Spacing between step buttons and thumb"),
-                                                             0,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("stepper-spacing",
+                                                                P_("Stepper Spacing"),
+                                                                P_("Spacing between step buttons and thumb"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("arrow-displacement-x",
-							     P_("Arrow X Displacement"),
-							     P_("How far in the x direction to move the arrow when the button is depressed"),
-							     G_MININT,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("arrow-displacement-x",
+                                                                P_("Arrow X Displacement"),
+                                                                P_("How far in the x direction to move the arrow when the button is depressed"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("arrow-displacement-y",
-							     P_("Arrow Y Displacement"),
-							     P_("How far in the y direction to move the arrow when the button is depressed"),
-							     G_MININT,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("arrow-displacement-y",
+                                                                P_("Arrow Y Displacement"),
+                                                                P_("How far in the y direction to move the arrow when the button is depressed"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
 					   g_param_spec_boolean ("activate-slider",
@@ -632,7 +620,7 @@ gtk_range_init (GtkRange *range)
   range->update_policy = GTK_UPDATE_CONTINUOUS;
   range->inverted = FALSE;
   range->flippable = FALSE;
-  range->min_slider_size = 1;
+  range->min_slider_size = GDK_UNIT_ONE_TWELFTH_EM (1);
   range->has_stepper_a = FALSE;
   range->has_stepper_b = FALSE;
   range->has_stepper_c = FALSE;
@@ -2799,7 +2787,7 @@ gtk_range_calc_request (GtkRange      *range,
 
   n_steppers = n_steppers_ab + n_steppers_cd;
 
-  slider_length = range->min_slider_size;
+  slider_length = GDK_UNIT_TO_PIXEL (range->min_slider_size);
 
   range_rect->x = 0;
   range_rect->y = 0;
@@ -3023,11 +3011,11 @@ gtk_range_calc_layout (GtkRange *range,
 	  height = ((bottom - top) * (range->adjustment->page_size /
 				       (range->adjustment->upper - range->adjustment->lower)));
 	else
-	  height = range->min_slider_size;
+	  height = GDK_UNIT_TO_PIXEL (range->min_slider_size);
         
-        if (height < range->min_slider_size ||
+        if (height < GDK_UNIT_TO_PIXEL (range->min_slider_size) ||
             range->slider_size_fixed)
-          height = range->min_slider_size;
+          height = GDK_UNIT_TO_PIXEL (range->min_slider_size);
 
         height = MIN (height, layout->trough.height);
         
@@ -3172,11 +3160,11 @@ gtk_range_calc_layout (GtkRange *range,
 	  width = ((right - left) * (range->adjustment->page_size /
                                    (range->adjustment->upper - range->adjustment->lower)));
 	else
-	  width = range->min_slider_size;
+	  width = GDK_UNIT_TO_PIXEL (range->min_slider_size);
         
-        if (width < range->min_slider_size ||
+        if (width < GDK_UNIT_TO_PIXEL (range->min_slider_size) ||
             range->slider_size_fixed)
-          width = range->min_slider_size;
+          width = GDK_UNIT_TO_PIXEL (range->min_slider_size);
         
         width = MIN (width, layout->trough.width);
         
Index: gtk/gtkfixed.c
===================================================================
--- gtk/gtkfixed.c	(revision 21028)
+++ gtk/gtkfixed.c	(working copy)
@@ -86,23 +86,19 @@ gtk_fixed_class_init (GtkFixedClass *class)
 
   gtk_container_class_install_child_property (container_class,
 					      CHILD_PROP_X,
-					      g_param_spec_int ("x",
-                                                                P_("X position"),
-                                                                P_("X position of child widget"),
-                                                                G_MININT,
-                                                                G_MAXINT,
-                                                                0,
-                                                                GTK_PARAM_READWRITE));
+					      gdk_param_spec_unit ("x",
+                                                                   P_("X position"),
+                                                                   P_("X position of child widget"),
+                                                                   0,
+                                                                   GTK_PARAM_READWRITE));
 
   gtk_container_class_install_child_property (container_class,
 					      CHILD_PROP_Y,
-					      g_param_spec_int ("y",
-                                                                P_("Y position"),
-                                                                P_("Y position of child widget"),
-                                                                G_MININT,
-                                                                G_MAXINT,
-                                                                0,
-                                                                GTK_PARAM_READWRITE));
+					      gdk_param_spec_unit ("y",
+                                                                   P_("Y position"),
+                                                                   P_("Y position of child widget"),
+                                                                   0,
+                                                                   GTK_PARAM_READWRITE));
 }
 
 static GType
@@ -149,8 +145,8 @@ get_child (GtkFixed  *fixed,
 void
 gtk_fixed_put (GtkFixed       *fixed,
                GtkWidget      *widget,
-               gint            x,
-               gint            y)
+               GdkUnit         x,
+               GdkUnit         y)
 {
   GtkFixedChild *child_info;
 
@@ -171,9 +167,9 @@ static void
 gtk_fixed_move_internal (GtkFixed       *fixed,
                          GtkWidget      *widget,
                          gboolean        change_x,
-                         gint            x,
+                         GdkUnit         x,
                          gboolean        change_y,
-                         gint            y)
+                         GdkUnit         y)
 {
   GtkFixedChild *child;
   
@@ -208,8 +204,8 @@ gtk_fixed_move_internal (GtkFixed       *fixed,
 void
 gtk_fixed_move (GtkFixed       *fixed,
                 GtkWidget      *widget,
-                gint            x,
-                gint            y)
+                GdkUnit         x,
+                GdkUnit         y)
 {
   gtk_fixed_move_internal (fixed, widget, TRUE, x, TRUE, y);
 }
@@ -226,14 +222,14 @@ gtk_fixed_set_child_property (GtkContainer    *con
     case CHILD_PROP_X:
       gtk_fixed_move_internal (GTK_FIXED (container),
                                child,
-                               TRUE, g_value_get_int (value),
+                               TRUE, gdk_value_get_unit (value),
                                FALSE, 0);
       break;
     case CHILD_PROP_Y:
       gtk_fixed_move_internal (GTK_FIXED (container),
                                child,
                                FALSE, 0,
-                               TRUE, g_value_get_int (value));
+                               TRUE, gdk_value_get_unit (value));
       break;
     default:
       GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
@@ -255,10 +251,10 @@ gtk_fixed_get_child_property (GtkContainer *contai
   switch (property_id)
     {
     case CHILD_PROP_X:
-      g_value_set_int (value, fixed_child->x);
+      gdk_value_set_unit (value, fixed_child->x);
       break;
     case CHILD_PROP_Y:
-      g_value_set_int (value, fixed_child->y);
+      gdk_value_set_unit (value, fixed_child->y);
       break;
     default:
       GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
@@ -324,10 +320,10 @@ gtk_fixed_size_request (GtkWidget      *widget,
           gtk_widget_size_request (child->widget, &child_requisition);
 
           requisition->height = MAX (requisition->height,
-                                     child->y +
+                                     GDK_UNIT_TO_PIXEL (child->y) +
                                      child_requisition.height);
           requisition->width = MAX (requisition->width,
-                                    child->x +
+                                    GDK_UNIT_TO_PIXEL (child->x) +
                                     child_requisition.width);
 	}
     }
@@ -372,8 +368,8 @@ gtk_fixed_size_allocate (GtkWidget     *widget,
       if (GTK_WIDGET_VISIBLE (child->widget))
 	{
 	  gtk_widget_get_child_requisition (child->widget, &child_requisition);
-	  child_allocation.x = child->x + border_width;
-	  child_allocation.y = child->y + border_width;
+	  child_allocation.x = GDK_UNIT_TO_PIXEL (child->x) + border_width;
+	  child_allocation.y = GDK_UNIT_TO_PIXEL (child->y) + border_width;
 
 	  if (GTK_WIDGET_NO_WINDOW (widget))
 	    {
Index: gtk/gtkfixed.h
===================================================================
--- gtk/gtkfixed.h	(revision 21028)
+++ gtk/gtkfixed.h	(working copy)
@@ -65,8 +65,8 @@ struct _GtkFixedClass
 struct _GtkFixedChild
 {
   GtkWidget *widget;
-  gint x;
-  gint y;
+  GdkUnit x;
+  GdkUnit y;
 };
 
 
@@ -74,12 +74,12 @@ GType      gtk_fixed_get_type          (void) G_GN
 GtkWidget* gtk_fixed_new               (void);
 void       gtk_fixed_put               (GtkFixed       *fixed,
                                         GtkWidget      *widget,
-                                        gint            x,
-                                        gint            y);
+                                        GdkUnit         x,
+                                        GdkUnit         y);
 void       gtk_fixed_move              (GtkFixed       *fixed,
                                         GtkWidget      *widget,
-                                        gint            x,
-                                        gint            y);
+                                        GdkUnit         x,
+                                        GdkUnit         y);
 void       gtk_fixed_set_has_window    (GtkFixed       *fixed,
 					gboolean        has_window);
 gboolean   gtk_fixed_get_has_window    (GtkFixed       *fixed);
Index: gtk/gtkexpander.c
===================================================================
--- gtk/gtkexpander.c	(revision 21028)
+++ gtk/gtkexpander.c	(working copy)
@@ -38,8 +38,8 @@
 
 #define GTK_EXPANDER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_EXPANDER, GtkExpanderPrivate))
 
-#define DEFAULT_EXPANDER_SIZE 10
-#define DEFAULT_EXPANDER_SPACING 2
+#define DEFAULT_EXPANDER_SIZE GDK_UNIT_ONE_TWELFTH_EM(10)
+#define DEFAULT_EXPANDER_SPACING GDK_UNIT_ONE_TWELFTH_EM(2)
 
 enum
 {
@@ -215,13 +215,11 @@ gtk_expander_class_init (GtkExpanderClass *klass)
 
   g_object_class_install_property (gobject_class,
 				   PROP_SPACING,
-				   g_param_spec_int ("spacing",
-						     P_("Spacing"),
-						     P_("Space to put between the label and the child"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("spacing",
+                                                        P_("Spacing"),
+                                                        P_("Space to put between the label and the child"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
 				   PROP_LABEL_WIDGET,
@@ -232,22 +230,18 @@ gtk_expander_class_init (GtkExpanderClass *klass)
 							GTK_PARAM_READWRITE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("expander-size",
-							     P_("Expander Size"),
-							     P_("Size of the expander arrow"),
-							     0,
-							     G_MAXINT,
-							     DEFAULT_EXPANDER_SIZE,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("expander-size",
+                                                                P_("Expander Size"),
+                                                                P_("Size of the expander arrow"),
+                                                                DEFAULT_EXPANDER_SIZE,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("expander-spacing",
-							     P_("Indicator Spacing"),
-							     P_("Spacing around expander arrow"),
-							     0,
-							     G_MAXINT,
-							     DEFAULT_EXPANDER_SPACING,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("expander-spacing",
+                                                                P_("Indicator Spacing"),
+                                                                P_("Spacing around expander arrow"),
+                                                                DEFAULT_EXPANDER_SPACING,
+                                                                GTK_PARAM_READABLE));
 
   widget_class->activate_signal =
     g_signal_new (I_("activate"),
@@ -330,7 +324,7 @@ gtk_expander_set_property (GObject      *object,
       gtk_expander_set_use_markup (expander, g_value_get_boolean (value));
       break;
     case PROP_SPACING:
-      gtk_expander_set_spacing (expander, g_value_get_int (value));
+      gtk_expander_set_spacing (expander, gdk_value_get_unit (value));
       break;
     case PROP_LABEL_WIDGET:
       gtk_expander_set_label_widget (expander, g_value_get_object (value));
@@ -365,7 +359,7 @@ gtk_expander_get_property (GObject    *object,
       g_value_set_boolean (value, priv->use_markup);
       break;
     case PROP_SPACING:
-      g_value_set_int (value, priv->spacing);
+      gdk_value_set_unit (value, priv->spacing);
       break;
     case PROP_LABEL_WIDGET:
       g_value_set_object (value,
@@ -1459,7 +1453,7 @@ gtk_expander_get_expanded (GtkExpander *expander)
  **/
 void
 gtk_expander_set_spacing (GtkExpander *expander,
-			  gint         spacing)
+			  GdkUnit      spacing)
 {
   g_return_if_fail (GTK_IS_EXPANDER (expander));
   g_return_if_fail (spacing >= 0);
@@ -1489,6 +1483,24 @@ gtk_expander_get_spacing (GtkExpander *expander)
 {
   g_return_val_if_fail (GTK_IS_EXPANDER (expander), 0);
 
+  return GDK_UNIT_TO_PIXEL (expander->priv->spacing);
+}
+
+/**
+ * gtk_expander_get_spacing_unit:
+ * @expander: a #GtkExpander
+ *
+ * Like gtk_expander_set_spacing() but preserves the unit.
+ *
+ * Return value: spacing between the expander and child.
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_expander_get_spacing_unit (GtkExpander *expander)
+{
+  g_return_val_if_fail (GTK_IS_EXPANDER (expander), 0);
+
   return expander->priv->spacing;
 }
 
Index: gtk/gtkexpander.h
===================================================================
--- gtk/gtkexpander.h	(revision 21028)
+++ gtk/gtkexpander.h	(working copy)
@@ -71,8 +71,9 @@ gboolean              gtk_expander_get_expanded
 
 /* Spacing between the expander/label and the child */
 void                  gtk_expander_set_spacing       (GtkExpander *expander,
-						      gint         spacing);
+						      GdkUnit      spacing);
 gint                  gtk_expander_get_spacing       (GtkExpander *expander);
+GdkUnit               gtk_expander_get_spacing_unit  (GtkExpander *expander);
 
 void                  gtk_expander_set_label         (GtkExpander *expander,
 						      const gchar *label);
Index: gtk/gtktextview.c
===================================================================
--- gtk/gtktextview.c	(revision 21028)
+++ gtk/gtktextview.c	(working copy)
@@ -534,33 +534,27 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
  
   g_object_class_install_property (gobject_class,
                                    PROP_PIXELS_ABOVE_LINES,
-                                   g_param_spec_int ("pixels-above-lines",
-						     P_("Pixels Above Lines"),
-						     P_("Pixels of blank space above paragraphs"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("pixels-above-lines",
+                                                        P_("Pixels Above Lines"),
+                                                        P_("Pixels of blank space above paragraphs"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
  
   g_object_class_install_property (gobject_class,
                                    PROP_PIXELS_BELOW_LINES,
-                                   g_param_spec_int ("pixels-below-lines",
-						     P_("Pixels Below Lines"),
-						     P_("Pixels of blank space below paragraphs"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("pixels-below-lines",
+                                                        P_("Pixels Below Lines"),
+                                                        P_("Pixels of blank space below paragraphs"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
  
   g_object_class_install_property (gobject_class,
                                    PROP_PIXELS_INSIDE_WRAP,
-                                   g_param_spec_int ("pixels-inside-wrap",
-						     P_("Pixels Inside Wrap"),
-						     P_("Pixels of blank space between wrapped lines in a paragraph"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("pixels-inside-wrap",
+                                                        P_("Pixels Inside Wrap"),
+                                                        P_("Pixels of blank space between wrapped lines in a paragraph"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
                                    PROP_EDITABLE,
@@ -590,33 +584,27 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
  
   g_object_class_install_property (gobject_class,
                                    PROP_LEFT_MARGIN,
-                                   g_param_spec_int ("left-margin",
-						     P_("Left Margin"),
-						     P_("Width of the left margin in pixels"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("left-margin",
+                                                        P_("Left Margin"),
+                                                        P_("Width of the left margin in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
                                    PROP_RIGHT_MARGIN,
-                                   g_param_spec_int ("right-margin",
-						     P_("Right Margin"),
-						     P_("Width of the right margin in pixels"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("right-margin",
+                                                        P_("Right Margin"),
+                                                        P_("Width of the right margin in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
                                    PROP_INDENT,
-                                   g_param_spec_int ("indent",
-						     P_("Indent"),
-						     P_("Amount to indent the paragraph, in pixels"),
-						     G_MININT,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("indent",
+                                                        P_("Indent"),
+                                                        P_("Amount to indent the paragraph, in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
                                    PROP_TABS,
@@ -2314,6 +2302,24 @@ gtk_text_view_get_pixels_above_lines (GtkTextView
 {
   g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (text_view->pixels_above_lines);
+}
+
+/**
+ * gtk_text_view_get_pixels_above_lines_unit:
+ * @text_view: a #GtkTextView
+ * 
+ * Like gtk_text_view_get_pixels_above_lines() but preserves the unit.
+ * 
+ * Return value: default number of pixels above paragraphs
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_text_view_get_pixels_above_lines_unit (GtkTextView *text_view)
+{
+  g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
+
   return text_view->pixels_above_lines;
 }
 
@@ -2359,6 +2365,24 @@ gtk_text_view_get_pixels_below_lines (GtkTextView
 {
   g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (text_view->pixels_below_lines);
+}
+
+/**
+ * gtk_text_view_get_pixels_below_lines_unit:
+ * @text_view: a #GtkTextView
+ * 
+ * Like gtk_text_view_get_pixels_below_lines() but preserves the unit.
+ * 
+ * Return value: default number of blank pixels below paragraphs
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_text_view_get_pixels_below_lines_unit (GtkTextView *text_view)
+{
+  g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
+
   return text_view->pixels_below_lines;
 }
 
@@ -2404,6 +2428,24 @@ gtk_text_view_get_pixels_inside_wrap (GtkTextView
 {
   g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (text_view->pixels_inside_wrap);
+}
+
+/**
+ * gtk_text_view_get_pixels_inside_wrap_unit:
+ * @text_view: a #GtkTextView
+ * 
+ * Like gtk_text_view_get_pixels_inside_wrap() but preserves the unit.
+ * 
+ * Return value: default number of pixels of blank space between wrapped lines
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_text_view_get_pixels_inside_wrap_unit (GtkTextView *text_view)
+{
+  g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
+
   return text_view->pixels_inside_wrap;
 }
 
@@ -2463,7 +2505,7 @@ gtk_text_view_get_justification (GtkTextView *text
  **/
 void
 gtk_text_view_set_left_margin (GtkTextView *text_view,
-                               gint         left_margin)
+                               GdkUnit      left_margin)
 {
   g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
 
@@ -2495,6 +2537,24 @@ gtk_text_view_get_left_margin (GtkTextView *text_v
 {
   g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (text_view->left_margin);
+}
+
+/**
+ * gtk_text_view_get_left_margin_unit:
+ * @text_view: a #GtkTextView
+ * 
+ * Like gtk_text_view_get_left_margin() but preserves the units.
+ * 
+ * Return value: left margin in pixels
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_text_view_get_left_margin_unit (GtkTextView *text_view)
+{
+  g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
+
   return text_view->left_margin;
 }
 
@@ -2508,7 +2568,7 @@ gtk_text_view_get_left_margin (GtkTextView *text_v
  **/
 void
 gtk_text_view_set_right_margin (GtkTextView *text_view,
-                                gint         right_margin)
+                                GdkUnit      right_margin)
 {
   g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
 
@@ -2540,6 +2600,24 @@ gtk_text_view_get_right_margin (GtkTextView *text_
 {
   g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (text_view->right_margin);
+}
+
+/**
+ * gtk_text_view_get_right_margin_unit:
+ * @text_view: a #GtkTextView
+ * 
+ * Like gtk_text_view_get_right_margin() but preserves the unit.
+ * 
+ * Return value: right margin in pixels
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_text_view_get_right_margin_unit (GtkTextView *text_view)
+{
+  g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
+
   return text_view->right_margin;
 }
 
@@ -2586,6 +2664,24 @@ gtk_text_view_get_indent (GtkTextView *text_view)
 {
   g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (text_view->indent);
+}
+
+/**
+ * gtk_text_view_get_indent_unit:
+ * @text_view: a #GtkTextView
+ * 
+ * Like gtk_text_view_get_indent() but preserves the unit.
+ * 
+ * Return value: number of pixels of indentation
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_text_view_get_indent_unit (GtkTextView *text_view)
+{
+  g_return_val_if_fail (GTK_IS_TEXT_VIEW (text_view), 0);
+
   return text_view->indent;
 }
 
@@ -2827,15 +2923,15 @@ gtk_text_view_set_property (GObject         *objec
   switch (prop_id)
     {
     case PROP_PIXELS_ABOVE_LINES:
-      gtk_text_view_set_pixels_above_lines (text_view, g_value_get_int (value));
+      gtk_text_view_set_pixels_above_lines (text_view, gdk_value_get_unit (value));
       break;
 
     case PROP_PIXELS_BELOW_LINES:
-      gtk_text_view_set_pixels_below_lines (text_view, g_value_get_int (value));
+      gtk_text_view_set_pixels_below_lines (text_view, gdk_value_get_unit (value));
       break;
 
     case PROP_PIXELS_INSIDE_WRAP:
-      gtk_text_view_set_pixels_inside_wrap (text_view, g_value_get_int (value));
+      gtk_text_view_set_pixels_inside_wrap (text_view, gdk_value_get_unit (value));
       break;
 
     case PROP_EDITABLE:
@@ -2851,15 +2947,15 @@ gtk_text_view_set_property (GObject         *objec
       break;
 
     case PROP_LEFT_MARGIN:
-      gtk_text_view_set_left_margin (text_view, g_value_get_int (value));
+      gtk_text_view_set_left_margin (text_view, gdk_value_get_unit (value));
       break;
 
     case PROP_RIGHT_MARGIN:
-      gtk_text_view_set_right_margin (text_view, g_value_get_int (value));
+      gtk_text_view_set_right_margin (text_view, gdk_value_get_unit (value));
       break;
 
     case PROP_INDENT:
-      gtk_text_view_set_indent (text_view, g_value_get_int (value));
+      gtk_text_view_set_indent (text_view, gdk_value_get_unit (value));
       break;
 
     case PROP_TABS:
@@ -2901,15 +2997,15 @@ gtk_text_view_get_property (GObject         *objec
   switch (prop_id)
     {
     case PROP_PIXELS_ABOVE_LINES:
-      g_value_set_int (value, text_view->pixels_above_lines);
+      gdk_value_set_unit (value, text_view->pixels_above_lines);
       break;
 
     case PROP_PIXELS_BELOW_LINES:
-      g_value_set_int (value, text_view->pixels_below_lines);
+      gdk_value_set_unit (value, text_view->pixels_below_lines);
       break;
 
     case PROP_PIXELS_INSIDE_WRAP:
-      g_value_set_int (value, text_view->pixels_inside_wrap);
+      gdk_value_set_unit (value, text_view->pixels_inside_wrap);
       break;
 
     case PROP_EDITABLE:
@@ -2925,15 +3021,15 @@ gtk_text_view_get_property (GObject         *objec
       break;
 
     case PROP_LEFT_MARGIN:
-      g_value_set_int (value, text_view->left_margin);
+      gdk_value_set_unit (value, text_view->left_margin);
       break;
 
     case PROP_RIGHT_MARGIN:
-      g_value_set_int (value, text_view->right_margin);
+      gdk_value_set_unit (value, text_view->right_margin);
       break;
 
     case PROP_INDENT:
-      g_value_set_int (value, text_view->indent);
+      gdk_value_set_unit (value, text_view->indent);
       break;
 
     case PROP_TABS:
Index: gtk/gtkpathbar.c
===================================================================
--- gtk/gtkpathbar.c	(revision 21028)
+++ gtk/gtkpathbar.c	(working copy)
@@ -329,7 +329,7 @@ gtk_path_bar_size_request (GtkWidget      *widget,
   /* Theoretically, the slider could be bigger than the other button.  But we're
    * not going to worry about that now.
    */
-  path_bar->slider_width = MIN(requisition->height * 2 / 3 + 5, requisition->height);
+  path_bar->slider_width = MIN(requisition->height * 2 / 3 + GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (5)), requisition->height);
   if (path_bar->button_list && path_bar->button_list->next != NULL)
     requisition->width += (path_bar->spacing + path_bar->slider_width) * 2;
 
@@ -1469,7 +1469,7 @@ make_directory_button (GtkPathBar  *path_bar,
       button_data->label = gtk_label_new (NULL);
       label_alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
       gtk_container_add (GTK_CONTAINER (label_alignment), button_data->label);
-      child = gtk_hbox_new (FALSE, 2);
+      child = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (2));
       gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0);
       gtk_box_pack_start (GTK_BOX (child), label_alignment, FALSE, FALSE, 0);
       break;
Index: gtk/gtkrecentchooserdialog.c
===================================================================
--- gtk/gtkrecentchooserdialog.c	(revision 21028)
+++ gtk/gtkrecentchooserdialog.c	(working copy)
@@ -94,9 +94,9 @@ gtk_recent_chooser_dialog_init (GtkRecentChooserDi
   dialog->priv = priv;
 
   gtk_dialog_set_has_separator (rc_dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (rc_dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (rc_dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (rc_dialog->action_area), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (rc_dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (rc_dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (rc_dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
 
 }
 
@@ -167,7 +167,7 @@ gtk_recent_chooser_dialog_constructor (GType
   		    G_CALLBACK (gtk_recent_chooser_item_activated_cb),
   		    object);
 
-  gtk_container_set_border_width (GTK_CONTAINER (priv->chooser), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (priv->chooser), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox),
                       priv->chooser, TRUE, TRUE, 0);
   gtk_widget_show (priv->chooser);
Index: gtk/gtktextview.h
===================================================================
--- gtk/gtktextview.h	(revision 21028)
+++ gtk/gtktextview.h	(working copy)
@@ -76,14 +76,14 @@ struct _GtkTextView
   guint GSEAL (scroll_timeout);
 
   /* Default style settings */
-  gint GSEAL (pixels_above_lines);
-  gint GSEAL (pixels_below_lines);
-  gint GSEAL (pixels_inside_wrap);
+  GdkUnit GSEAL (pixels_above_lines);
+  GdkUnit GSEAL (pixels_below_lines);
+  GdkUnit GSEAL (pixels_inside_wrap);
   GtkWrapMode GSEAL (wrap_mode);
   GtkJustification GSEAL (justify);
-  gint GSEAL (left_margin);
-  gint GSEAL (right_margin);
-  gint GSEAL (indent);
+  GdkUnit GSEAL (left_margin);
+  GdkUnit GSEAL (right_margin);
+  GdkUnit GSEAL (indent);
   PangoTabArray *GSEAL (tabs);
   guint GSEAL (editable) : 1;
 
@@ -337,26 +337,32 @@ void		 gtk_text_view_set_accepts_tab        (GtkTe
 						       gboolean		 accepts_tab);
 gboolean	 gtk_text_view_get_accepts_tab        (GtkTextView	*text_view);
 void             gtk_text_view_set_pixels_above_lines (GtkTextView      *text_view,
-                                                       gint              pixels_above_lines);
+                                                       GdkUnit           pixels_above_lines);
 gint             gtk_text_view_get_pixels_above_lines (GtkTextView      *text_view);
+GdkUnit          gtk_text_view_get_pixels_above_lines_unit (GtkTextView *text_view);
 void             gtk_text_view_set_pixels_below_lines (GtkTextView      *text_view,
-                                                       gint              pixels_below_lines);
+                                                       GdkUnit           pixels_below_lines);
 gint             gtk_text_view_get_pixels_below_lines (GtkTextView      *text_view);
+GdkUnit          gtk_text_view_get_pixels_below_lines_unit (GtkTextView *text_view);
 void             gtk_text_view_set_pixels_inside_wrap (GtkTextView      *text_view,
-                                                       gint              pixels_inside_wrap);
+                                                       GdkUnit           pixels_inside_wrap);
 gint             gtk_text_view_get_pixels_inside_wrap (GtkTextView      *text_view);
+GdkUnit          gtk_text_view_get_pixels_inside_wrap_unit (GtkTextView *text_view);
 void             gtk_text_view_set_justification      (GtkTextView      *text_view,
                                                        GtkJustification  justification);
 GtkJustification gtk_text_view_get_justification      (GtkTextView      *text_view);
 void             gtk_text_view_set_left_margin        (GtkTextView      *text_view,
-                                                       gint              left_margin);
+                                                       GdkUnit           left_margin);
 gint             gtk_text_view_get_left_margin        (GtkTextView      *text_view);
+GdkUnit          gtk_text_view_get_left_margin_unit   (GtkTextView      *text_view);
 void             gtk_text_view_set_right_margin       (GtkTextView      *text_view,
-                                                       gint              right_margin);
+                                                       GdkUnit           right_margin);
 gint             gtk_text_view_get_right_margin       (GtkTextView      *text_view);
+GdkUnit          gtk_text_view_get_right_margin_unit  (GtkTextView      *text_view);
 void             gtk_text_view_set_indent             (GtkTextView      *text_view,
-                                                       gint              indent);
+                                                       GdkUnit           indent);
 gint             gtk_text_view_get_indent             (GtkTextView      *text_view);
+GdkUnit          gtk_text_view_get_indent_unit        (GtkTextView      *text_view);
 void             gtk_text_view_set_tabs               (GtkTextView      *text_view,
                                                        PangoTabArray    *tabs);
 PangoTabArray*   gtk_text_view_get_tabs               (GtkTextView      *text_view);
Index: gtk/gtkmessagedialog.c
===================================================================
--- gtk/gtkmessagedialog.c	(revision 21028)
+++ gtk/gtkmessagedialog.c	(working copy)
@@ -94,13 +94,11 @@ gtk_message_dialog_class_init (GtkMessageDialogCla
   gobject_class->get_property = gtk_message_dialog_get_property;
   
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("message-border",
-                                                             P_("Image/label border"),
-                                                             P_("Width of border around the label and image in the message dialog"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             12,
-                                                             GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("message-border",
+								P_("Image/label border"),
+								P_("Width of border around the label and image in the message dialog"),
+								GDK_UNIT_ONE_TWELFTH_EM (12),
+								GTK_PARAM_READABLE));
   /**
    * GtkMessageDialog:use-separator:
    *
@@ -250,8 +248,8 @@ gtk_message_dialog_init (GtkMessageDialog *dialog)
   gtk_label_set_selectable (GTK_LABEL (priv->secondary_label), TRUE);
   gtk_misc_set_alignment   (GTK_MISC  (priv->secondary_label), 0.0, 0.0);
 
-  hbox = gtk_hbox_new (FALSE, 12);
-  vbox = gtk_vbox_new (FALSE, 12);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
 
   gtk_box_pack_start (GTK_BOX (vbox), dialog->label,
                       FALSE, FALSE, 0);
@@ -269,11 +267,11 @@ gtk_message_dialog_init (GtkMessageDialog *dialog)
                       hbox,
                       FALSE, FALSE, 0);
 
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
-  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14); /* 14 + 2 * 5 = 24 */
-  gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), GDK_UNIT_ONE_TWELFTH_EM (14)); /* 14 + 2 * 5 = 24 */
+  gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   gtk_widget_show_all (hbox);
 
Index: gtk/gtkmenubar.c
===================================================================
--- gtk/gtkmenubar.c	(revision 21028)
+++ gtk/gtkmenubar.c	(working copy)
@@ -41,7 +41,7 @@
 
 
 #define BORDER_SPACING  0
-#define DEFAULT_IPADDING 1
+#define DEFAULT_IPADDING GDK_UNIT_ONE_TWELFTH_EM(1)
 
 /* Properties */
 enum {
@@ -198,13 +198,11 @@ gtk_menu_bar_class_init (GtkMenuBarClass *class)
                                                               GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("internal-padding",
-							     P_("Internal padding"),
-							     P_("Amount of border space between the menubar shadow and the menu items"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_IPADDING,
-                                                             GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("internal-padding",
+                                                                P_("Internal padding"),
+                                                                P_("Amount of border space between the menubar shadow and the menu items"),
+                                                                DEFAULT_IPADDING,
+                                                                GTK_PARAM_READABLE));
 
   gtk_settings_install_property (g_param_spec_int ("gtk-menu-bar-popup-delay",
 						   P_("Delay before drop down menus appear"),
Index: gtk/gtkvbox.c
===================================================================
--- gtk/gtkvbox.c	(revision 21028)
+++ gtk/gtkvbox.c	(working copy)
@@ -61,7 +61,7 @@ gtk_vbox_new (gboolean homogeneous,
 
   vbox = g_object_new (GTK_TYPE_VBOX, NULL);
 
-  GTK_BOX (vbox)->spacing = spacing;
+  gtk_box_set_spacing (GTK_BOX (vbox), spacing);
   GTK_BOX (vbox)->homogeneous = homogeneous ? TRUE : FALSE;
 
   return GTK_WIDGET (vbox);
Index: gtk/gtkiconfactory.c
===================================================================
--- gtk/gtkiconfactory.c	(revision 21028)
+++ gtk/gtkiconfactory.c	(working copy)
@@ -606,33 +606,33 @@ init_icon_sizes (void)
       
       icon_sizes[GTK_ICON_SIZE_MENU].size = GTK_ICON_SIZE_MENU;
       icon_sizes[GTK_ICON_SIZE_MENU].name = "gtk-menu";
-      icon_sizes[GTK_ICON_SIZE_MENU].width = 16;
-      icon_sizes[GTK_ICON_SIZE_MENU].height = 16;
+      icon_sizes[GTK_ICON_SIZE_MENU].width = GDK_UNIT_ONE_TWELFTH_EM (16);
+      icon_sizes[GTK_ICON_SIZE_MENU].height = GDK_UNIT_ONE_TWELFTH_EM (16);
 
       icon_sizes[GTK_ICON_SIZE_BUTTON].size = GTK_ICON_SIZE_BUTTON;
       icon_sizes[GTK_ICON_SIZE_BUTTON].name = "gtk-button";
-      icon_sizes[GTK_ICON_SIZE_BUTTON].width = 20;
-      icon_sizes[GTK_ICON_SIZE_BUTTON].height = 20;
+      icon_sizes[GTK_ICON_SIZE_BUTTON].width = GDK_UNIT_ONE_TWELFTH_EM (20);
+      icon_sizes[GTK_ICON_SIZE_BUTTON].height = GDK_UNIT_ONE_TWELFTH_EM (20);
 
       icon_sizes[GTK_ICON_SIZE_SMALL_TOOLBAR].size = GTK_ICON_SIZE_SMALL_TOOLBAR;
       icon_sizes[GTK_ICON_SIZE_SMALL_TOOLBAR].name = "gtk-small-toolbar";
-      icon_sizes[GTK_ICON_SIZE_SMALL_TOOLBAR].width = 18;
-      icon_sizes[GTK_ICON_SIZE_SMALL_TOOLBAR].height = 18;
+      icon_sizes[GTK_ICON_SIZE_SMALL_TOOLBAR].width = GDK_UNIT_ONE_TWELFTH_EM (18);
+      icon_sizes[GTK_ICON_SIZE_SMALL_TOOLBAR].height = GDK_UNIT_ONE_TWELFTH_EM (18);
       
       icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].size = GTK_ICON_SIZE_LARGE_TOOLBAR;
       icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].name = "gtk-large-toolbar";
-      icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].width = 24;
-      icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].height = 24;
+      icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].width = GDK_UNIT_ONE_TWELFTH_EM (24);
+      icon_sizes[GTK_ICON_SIZE_LARGE_TOOLBAR].height = GDK_UNIT_ONE_TWELFTH_EM (24);
 
       icon_sizes[GTK_ICON_SIZE_DND].size = GTK_ICON_SIZE_DND;
       icon_sizes[GTK_ICON_SIZE_DND].name = "gtk-dnd";
-      icon_sizes[GTK_ICON_SIZE_DND].width = 32;
-      icon_sizes[GTK_ICON_SIZE_DND].height = 32;
+      icon_sizes[GTK_ICON_SIZE_DND].width = GDK_UNIT_ONE_TWELFTH_EM (32);
+      icon_sizes[GTK_ICON_SIZE_DND].height = GDK_UNIT_ONE_TWELFTH_EM (32);
 
       icon_sizes[GTK_ICON_SIZE_DIALOG].size = GTK_ICON_SIZE_DIALOG;
       icon_sizes[GTK_ICON_SIZE_DIALOG].name = "gtk-dialog";
-      icon_sizes[GTK_ICON_SIZE_DIALOG].width = 48;
-      icon_sizes[GTK_ICON_SIZE_DIALOG].height = 48;
+      icon_sizes[GTK_ICON_SIZE_DIALOG].width = GDK_UNIT_ONE_TWELFTH_EM (48);
+      icon_sizes[GTK_ICON_SIZE_DIALOG].height = GDK_UNIT_ONE_TWELFTH_EM (48);
 
       g_assert ((GTK_ICON_SIZE_DIALOG + 1) == NUM_BUILTIN_SIZES);
 
@@ -852,7 +852,8 @@ static gboolean
 icon_size_lookup_intern (GtkSettings *settings,
 			 GtkIconSize  size,
 			 gint        *widthp,
-			 gint        *heightp)
+			 gint        *heightp,
+                         gboolean     preserve_unit)
 {
   GArray *settings_sizes;
   gint width_for_settings = -1;
@@ -889,10 +890,12 @@ icon_size_lookup_intern (GtkSettings *settings,
     }
 
   if (widthp)
-    *widthp = width_for_settings >= 0 ? width_for_settings : icon_sizes[size].width;
+    *widthp = preserve_unit ? (width_for_settings >= 0 ? width_for_settings : icon_sizes[size].width) :
+              GDK_UNIT_TO_PIXEL (width_for_settings >= 0 ? width_for_settings : icon_sizes[size].width);
 
   if (heightp)
-    *heightp = height_for_settings >= 0 ? height_for_settings : icon_sizes[size].height;
+    *heightp = preserve_unit ? (height_for_settings >= 0 ? height_for_settings : icon_sizes[size].height) :
+               GDK_UNIT_TO_PIXEL (height_for_settings >= 0 ? height_for_settings : icon_sizes[size].height);
 
   return TRUE;
 }
@@ -928,10 +931,35 @@ gtk_icon_size_lookup_for_settings (GtkSettings *se
 {
   g_return_val_if_fail (GTK_IS_SETTINGS (settings), FALSE);
 
-  return icon_size_lookup_intern (settings, size, width, height);
+  return icon_size_lookup_intern (settings, size, width, height, FALSE);
 }
 
 /**
+ * gtk_icon_size_lookup_for_settings_unit:
+ * @settings: a #GtkSettings object, used to determine
+ *   which set of user preferences to used.
+ * @size: an icon size
+ * @width: location to store icon width
+ * @height: location to store icon height
+ *
+ * Like gtk_icon_size_lookup_for_settings() but preserves the unit.
+ *
+ * Return value: %TRUE if @size was a valid size
+ *
+ * Since: 2.14
+ **/
+gboolean
+gtk_icon_size_lookup_for_settings_unit (GtkSettings *settings,
+                                        GtkIconSize  size,
+                                        GdkUnit     *width,
+                                        GdkUnit     *height)
+{
+  g_return_val_if_fail (GTK_IS_SETTINGS (settings), FALSE);
+
+  return icon_size_lookup_intern (settings, size, width, height, TRUE);
+}
+
+/**
  * gtk_icon_size_lookup:
  * @size: an icon size
  * @width: location to store icon width
@@ -963,6 +991,30 @@ gtk_icon_size_lookup (GtkIconSize  size,
 					    size, widthp, heightp);
 }
 
+/**
+ * gtk_icon_size_lookup_unit:
+ * @size: an icon size
+ * @width: location to store icon width
+ * @height: location to store icon height
+ *
+ * Like gtk_icon_size_lookup() but preserves the unit.
+ * 
+ * Return value: %TRUE if @size was a valid size
+ *
+ * Since: 2.14
+ **/
+gboolean
+gtk_icon_size_lookup_unit (GtkIconSize  size,
+                           GdkUnit     *widthp,
+                           GdkUnit     *heightp)
+{
+  GTK_NOTE (MULTIHEAD,
+	    g_warning ("gtk_icon_size_lookup ()) is not multihead safe"));
+
+  return gtk_icon_size_lookup_for_settings_unit (gtk_settings_get_default (),
+                                                 size, widthp, heightp);
+}
+
 static GtkIconSize
 icon_size_register_intern (const gchar *name,
 			   gint         width,
@@ -1051,7 +1103,7 @@ gtk_icon_size_register_alias (const gchar *alias,
 
   init_icon_sizes ();
 
-  if (!icon_size_lookup_intern (NULL, target, NULL, NULL))
+  if (!icon_size_lookup_intern (NULL, target, NULL, NULL, FALSE))
     g_warning ("gtk_icon_size_register_alias: Icon size %u does not exist", target);
 
   ia = g_hash_table_lookup (icon_aliases, alias);
@@ -1337,8 +1389,8 @@ sizes_equivalent (GtkIconSize lhs,
   
   gint r_w, r_h, l_w, l_h;
 
-  icon_size_lookup_intern (NULL, rhs, &r_w, &r_h);
-  icon_size_lookup_intern (NULL, lhs, &l_w, &l_h);
+  icon_size_lookup_intern (NULL, rhs, &r_w, &r_h, FALSE);
+  icon_size_lookup_intern (NULL, lhs, &l_w, &l_h, FALSE);
 
   return r_w == l_w && r_h == l_h;
 #endif
Index: gtk/gtkcheckmenuitem.c
===================================================================
--- gtk/gtkcheckmenuitem.c	(revision 21028)
+++ gtk/gtkcheckmenuitem.c	(working copy)
@@ -106,14 +106,11 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemCl
                                                          GTK_PARAM_READWRITE));
   
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("indicator-size",
-                                                             P_("Indicator Size")
-,
-                                                             P_("Size of check or radio indicator"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             13,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("indicator-size",
+                                                                P_("Indicator Size"),
+                                                                P_("Size of check or radio indicator"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (13),
+                                                                GTK_PARAM_READABLE));
 
   widget_class->expose_event = gtk_check_menu_item_expose;
   
Index: gtk/gtkcolorsel.c
===================================================================
--- gtk/gtkcolorsel.c	(revision 21028)
+++ gtk/gtkcolorsel.c	(working copy)
@@ -65,8 +65,8 @@
 #define GTK_CUSTOM_PALETTE_WIDTH 10
 #define GTK_CUSTOM_PALETTE_HEIGHT 2
 
-#define CUSTOM_PALETTE_ENTRY_WIDTH   20
-#define CUSTOM_PALETTE_ENTRY_HEIGHT  20
+#define CUSTOM_PALETTE_ENTRY_WIDTH   GDK_UNIT_ONE_TWELFTH_EM(20)
+#define CUSTOM_PALETTE_ENTRY_HEIGHT  GDK_UNIT_ONE_TWELFTH_EM(20)
 
 /* The cursor for the dropper */
 #define DROPPER_WIDTH 17
@@ -340,24 +340,26 @@ gtk_color_selection_init (GtkColorSelection *color
   priv->default_set = FALSE;
   priv->default_alpha_set = FALSE;
   
-  top_hbox = gtk_hbox_new (FALSE, 12);
+  top_hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_start (GTK_BOX (colorsel), top_hbox, FALSE, FALSE, 0);
   
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   priv->triangle_colorsel = gtk_hsv_new ();
   g_signal_connect (priv->triangle_colorsel, "changed",
                     G_CALLBACK (hsv_changed), colorsel);
-  gtk_hsv_set_metrics (GTK_HSV (priv->triangle_colorsel), 174, 15);
+  gtk_hsv_set_metrics (GTK_HSV (priv->triangle_colorsel),
+                       GDK_UNIT_ONE_TWELFTH_EM (174),
+                       GDK_UNIT_ONE_TWELFTH_EM (15));
   gtk_box_pack_start (GTK_BOX (top_hbox), vbox, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (vbox), priv->triangle_colorsel, FALSE, FALSE, 0);
   gtk_widget_set_tooltip_text (priv->triangle_colorsel,
                         _("Select the color you want from the outer ring. Select the darkness or lightness of that color using the inner triangle."));
   
-  hbox = gtk_hbox_new (FALSE, 6);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
   
   frame = gtk_frame_new (NULL);
-  gtk_widget_set_size_request (frame, -1, 30);
+  gtk_widget_set_size_request (frame, -1, GDK_UNIT_ONE_TWELFTH_EM (30));
   gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
   color_sample_new (colorsel);
   gtk_container_add (GTK_CONTAINER (frame), priv->sample_area);
@@ -377,12 +379,12 @@ gtk_color_selection_init (GtkColorSelection *color
   gtk_widget_set_tooltip_text (button,
                         _("Click the eyedropper, then click a color anywhere on your screen to select that color."));
   
-  top_right_vbox = gtk_vbox_new (FALSE, 6);
+  top_right_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (top_hbox), top_right_vbox, FALSE, FALSE, 0);
   table = gtk_table_new (8, 6, FALSE);
   gtk_box_pack_start (GTK_BOX (top_right_vbox), table, FALSE, FALSE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   
   make_label_spinbutton (colorsel, &priv->hue_spinbutton, _("_Hue:"), table, 0, 0, COLORSEL_HUE,
                          _("Position on the color wheel."));
@@ -417,7 +419,7 @@ gtk_color_selection_init (GtkColorSelection *color
   priv->opacity_entry = gtk_entry_new (); 
   gtk_widget_set_tooltip_text (priv->opacity_entry,
                         _("Transparency of the color."));
-  gtk_widget_set_size_request (priv->opacity_entry, 40, -1); 
+  gtk_widget_set_size_request (priv->opacity_entry, GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (40)), -1); 
 
   g_signal_connect (priv->opacity_entry, "activate",
                     G_CALLBACK (opacity_entry_changed), colorsel);
@@ -456,8 +458,8 @@ gtk_color_selection_init (GtkColorSelection *color
 
   /* Set up the palette */
   table = gtk_table_new (GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, TRUE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 1);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 1);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (1));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (1));
   for (i = 0; i < GTK_CUSTOM_PALETTE_WIDTH; i++)
     {
       for (j = 0; j < GTK_CUSTOM_PALETTE_HEIGHT; j++)
@@ -466,7 +468,7 @@ gtk_color_selection_init (GtkColorSelection *color
 	}
     }
   set_selected_palette (colorsel, 0, 0);
-  priv->palette_frame = gtk_vbox_new (FALSE, 6);
+  priv->palette_frame = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   label = gtk_label_new_with_mnemonic (_("_Palette:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_box_pack_start (GTK_BOX (priv->palette_frame), label, FALSE, FALSE, 0);
Index: gtk/gtkiconfactory.h
===================================================================
--- gtk/gtkiconfactory.h	(revision 21028)
+++ gtk/gtkiconfactory.h	(working copy)
@@ -100,11 +100,18 @@ GtkIconSet* gtk_icon_factory_lookup_default  (cons
 gboolean gtk_icon_size_lookup              (GtkIconSize  size,
 					    gint        *width,
 					    gint        *height);
+gboolean gtk_icon_size_lookup_unit         (GtkIconSize  size,
+					    GdkUnit     *width,
+					    GdkUnit     *height);
 #endif /* GDK_MULTIHEAD_SAFE */
 gboolean gtk_icon_size_lookup_for_settings (GtkSettings *settings,
 					    GtkIconSize  size,
 					    gint        *width,
 					    gint        *height);
+gboolean gtk_icon_size_lookup_for_settings_unit (GtkSettings *settings,
+                                                 GtkIconSize  size,
+                                                 GdkUnit     *width,
+                                                 GdkUnit     *height);
 
 GtkIconSize           gtk_icon_size_register       (const gchar *name,
                                                     gint         width,
Index: gtk/gtkbuilder.c
===================================================================
--- gtk/gtkbuilder.c	(revision 21028)
+++ gtk/gtkbuilder.c	(working copy)
@@ -1152,6 +1152,44 @@ gtk_builder_value_from_string (GtkBuilder   *build
       return TRUE;
     }
 
+  /* GdkParamSpecUnit, GdkParamSpecUUnit have fundamental types
+   * G_TYPE_INT resp. G_TYPE_UINT so cannot handle in the switch;
+   * do it separately
+   */
+  if (GDK_IS_PARAM_SPEC_UNIT (pspec) || GDK_IS_PARAM_SPEC_UUNIT (pspec))
+    {
+      GdkUnit unit;
+      gchar *endptr;
+
+      errno = 0;
+      unit = strtoul (string, &endptr, 0);
+      if (errno != 0 || endptr == string)
+        {
+          g_set_error (error,
+                       GTK_BUILDER_ERROR,
+                       GTK_BUILDER_ERROR_INVALID_VALUE,
+                       "Could not parse %s `%s'",
+                       GDK_IS_PARAM_SPEC_UNIT (pspec) ? "GdkUnit" : "GdkUUnit",
+                       string);
+          return FALSE;
+        }
+
+      if (g_str_has_suffix (string, "em"))
+        unit = GDK_UNIT_EM (unit);
+
+      if (GDK_IS_PARAM_SPEC_UNIT (pspec))
+        {
+          g_value_init (value, G_TYPE_INT);
+          gdk_value_set_unit (value, unit);
+        }
+      else
+        {
+          g_value_init (value, G_TYPE_UINT);
+          gdk_value_set_uunit (value, unit);
+        }
+      return TRUE;
+    }
+
   return gtk_builder_value_from_string_type (builder,
 					     G_PARAM_SPEC_VALUE_TYPE (pspec),
                                              string, value, error);
Index: gtk/gtkscrolledwindow.c
===================================================================
--- gtk/gtkscrolledwindow.c	(revision 21028)
+++ gtk/gtkscrolledwindow.c	(working copy)
@@ -1200,7 +1200,7 @@ gtk_scrolled_window_size_request (GtkWidget      *
 
 	  if (aux_info && aux_info->width > 0)
 	    {
-	      requisition->width += aux_info->width;
+	      requisition->width += GDK_UNIT_TO_PIXEL (aux_info->width);
 	      extra_width = -1;
 	    }
 	  else
@@ -1213,9 +1213,9 @@ gtk_scrolled_window_size_request (GtkWidget      *
 	{
 	  GtkWidgetAuxInfo *aux_info = _gtk_widget_get_aux_info (bin->child, FALSE);
 
-	  if (aux_info && aux_info->height > 0)
+	  if (aux_info && GDK_UNIT_TO_PIXEL (aux_info->height) > 0)
 	    {
-	      requisition->height += aux_info->height;
+	      requisition->height += GDK_UNIT_TO_PIXEL (aux_info->height);
 	      extra_height = -1;
 	    }
 	  else
Index: gtk/gtkdialog.c
===================================================================
--- gtk/gtkdialog.c	(revision 21028)
+++ gtk/gtkdialog.c	(working copy)
@@ -186,30 +186,24 @@ gtk_dialog_class_init (GtkDialogClass *class)
 		  G_TYPE_NONE, 0);
   
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("content-area-border",
-                                                             P_("Content area border"),
-                                                             P_("Width of border around the main dialog area"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             2,
-                                                             GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("content-area-border",
+                                                                P_("Content area border"),
+                                                                P_("Width of border around the main dialog area"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("button-spacing",
-                                                             P_("Button spacing"),
-                                                             P_("Spacing between buttons"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             6,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("button-spacing",
+                                                                P_("Button spacing"),
+                                                                P_("Spacing between buttons"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (6),
+                                                                GTK_PARAM_READABLE));
   
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("action-area-border",
-                                                             P_("Action area border"),
-                                                             P_("Width of border around the button area at the bottom of the dialog"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             5,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("action-area-border",
+                                                                P_("Action area border"),
+                                                                P_("Width of border around the button area at the bottom of the dialog"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (5),
+                                                                GTK_PARAM_READABLE));
 
   binding_set = gtk_binding_set_by_class (class);
   
@@ -220,17 +214,17 @@ static void
 update_spacings (GtkDialog *dialog)
 {
   GtkWidget *widget;
-  gint content_area_border;
-  gint button_spacing;
-  gint action_area_border;
+  GdkUnit content_area_border;
+  GdkUnit button_spacing;
+  GdkUnit action_area_border;
   
   widget = GTK_WIDGET (dialog);
 
-  gtk_widget_style_get (widget,
-                        "content-area-border", &content_area_border,
-                        "button-spacing", &button_spacing,
-                        "action-area-border", &action_area_border,
-                        NULL);
+  gtk_widget_style_get_unit (widget,
+                             "content-area-border", &content_area_border,
+                             "button-spacing", &button_spacing,
+                             "action-area-border", &action_area_border,
+                             NULL);
 
   gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox),
                                   content_area_border);
Index: gtk/gtktexttag.c
===================================================================
--- gtk/gtktexttag.c	(revision 21028)
+++ gtk/gtktexttag.c	(working copy)
@@ -382,34 +382,28 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
 
   g_object_class_install_property (object_class,
                                    PROP_LEFT_MARGIN,
-                                   g_param_spec_int ("left-margin",
-                                                     P_("Left margin"),
-                                                     P_("Width of the left margin in pixels"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("left-margin",
+                                                        P_("Left margin"),
+                                                        P_("Width of the left margin in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_RIGHT_MARGIN,
-                                   g_param_spec_int ("right-margin",
-                                                     P_("Right margin"),
-                                                     P_("Width of the right margin in pixels"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("right-margin",
+                                                        P_("Right margin"),
+                                                        P_("Width of the right margin in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   
   g_object_class_install_property (object_class,
                                    PROP_INDENT,
-                                   g_param_spec_int ("indent",
-                                                     P_("Indent"),
-                                                     P_("Amount to indent the paragraph, in pixels"),
-                                                     G_MININT,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("indent",
+                                                        P_("Indent"),
+                                                        P_("Amount to indent the paragraph, in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   
   g_object_class_install_property (object_class,
@@ -424,33 +418,27 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
 
   g_object_class_install_property (object_class,
                                    PROP_PIXELS_ABOVE_LINES,
-                                   g_param_spec_int ("pixels-above-lines",
-                                                     P_("Pixels above lines"),
-                                                     P_("Pixels of blank space above paragraphs"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("pixels-above-lines",
+                                                        P_("Pixels above lines"),
+                                                        P_("Pixels of blank space above paragraphs"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
   
   g_object_class_install_property (object_class,
                                    PROP_PIXELS_BELOW_LINES,
-                                   g_param_spec_int ("pixels-below-lines",
-                                                     P_("Pixels below lines"),
-                                                     P_("Pixels of blank space below paragraphs"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("pixels-below-lines",
+                                                        P_("Pixels below lines"),
+                                                        P_("Pixels of blank space below paragraphs"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_PIXELS_INSIDE_WRAP,
-                                   g_param_spec_int ("pixels-inside-wrap",
-                                                     P_("Pixels inside wrap"),
-                                                     P_("Pixels of blank space between wrapped lines in a paragraph"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("pixels-inside-wrap",
+                                                        P_("Pixels inside wrap"),
+                                                        P_("Pixels of blank space between wrapped lines in a paragraph"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_STRIKETHROUGH,
@@ -1178,21 +1166,21 @@ gtk_text_tag_set_property (GObject      *object,
       
     case PROP_PIXELS_ABOVE_LINES:
       text_tag->pixels_above_lines_set = TRUE;
-      text_tag->values->pixels_above_lines = g_value_get_int (value);
+      text_tag->values->pixels_above_lines = gdk_value_get_unit (value);
       g_object_notify (object, "pixels-above-lines-set");
       size_changed = TRUE;
       break;
 
     case PROP_PIXELS_BELOW_LINES:
       text_tag->pixels_below_lines_set = TRUE;
-      text_tag->values->pixels_below_lines = g_value_get_int (value);
+      text_tag->values->pixels_below_lines = gdk_value_get_unit (value);
       g_object_notify (object, "pixels-below-lines-set");
       size_changed = TRUE;
       break;
 
     case PROP_PIXELS_INSIDE_WRAP:
       text_tag->pixels_inside_wrap_set = TRUE;
-      text_tag->values->pixels_inside_wrap = g_value_get_int (value);
+      text_tag->values->pixels_inside_wrap = gdk_value_get_unit (value);
       g_object_notify (object, "pixels-inside-wrap-set");
       size_changed = TRUE;
       break;
@@ -1223,14 +1211,14 @@ gtk_text_tag_set_property (GObject      *object,
 
     case PROP_LEFT_MARGIN:
       text_tag->left_margin_set = TRUE;
-      text_tag->values->left_margin = g_value_get_int (value);
+      text_tag->values->left_margin = gdk_value_get_unit (value);
       g_object_notify (object, "left-margin-set");
       size_changed = TRUE;
       break;
 
     case PROP_INDENT:
       text_tag->indent_set = TRUE;
-      text_tag->values->indent = g_value_get_int (value);
+      text_tag->values->indent = gdk_value_get_unit (value);
       g_object_notify (object, "indent-set");
       size_changed = TRUE;
       break;
@@ -1243,7 +1231,7 @@ gtk_text_tag_set_property (GObject      *object,
 
     case PROP_RIGHT_MARGIN:
       text_tag->right_margin_set = TRUE;
-      text_tag->values->right_margin = g_value_get_int (value);
+      text_tag->values->right_margin = gdk_value_get_unit (value);
       g_object_notify (object, "right-margin-set");
       size_changed = TRUE;
       break;
@@ -1578,15 +1566,15 @@ gtk_text_tag_get_property (GObject      *object,
       break;
       
     case PROP_PIXELS_ABOVE_LINES:
-      g_value_set_int (value,  tag->values->pixels_above_lines);
+      gdk_value_set_unit (value,  tag->values->pixels_above_lines);
       break;
 
     case PROP_PIXELS_BELOW_LINES:
-      g_value_set_int (value,  tag->values->pixels_below_lines);
+      gdk_value_set_unit (value,  tag->values->pixels_below_lines);
       break;
 
     case PROP_PIXELS_INSIDE_WRAP:
-      g_value_set_int (value,  tag->values->pixels_inside_wrap);
+      gdk_value_set_unit (value,  tag->values->pixels_inside_wrap);
       break;
 
     case PROP_EDITABLE:
@@ -1606,11 +1594,11 @@ gtk_text_tag_get_property (GObject      *object,
       break;
       
     case PROP_LEFT_MARGIN:
-      g_value_set_int (value,  tag->values->left_margin);
+      gdk_value_set_unit (value,  tag->values->left_margin);
       break;
 
     case PROP_INDENT:
-      g_value_set_int (value,  tag->values->indent);
+      gdk_value_set_unit (value,  tag->values->indent);
       break;
 
     case PROP_STRIKETHROUGH:
@@ -1618,7 +1606,7 @@ gtk_text_tag_get_property (GObject      *object,
       break;
 
     case PROP_RIGHT_MARGIN:
-      g_value_set_int (value, tag->values->right_margin);
+      gdk_value_set_unit (value, tag->values->right_margin);
       break;
 
     case PROP_UNDERLINE:
@@ -2253,13 +2241,13 @@ _gtk_text_attributes_fill_from_tags (GtkTextAttrib
       if (tag->left_margin_set) 
         {
           if (tag->accumulative_margin)
-            left_margin_accumulative += vals->left_margin;
+            left_margin_accumulative += GDK_UNIT_TO_PIXEL (vals->left_margin);
           else
-            dest->left_margin = vals->left_margin;
+            dest->left_margin = GDK_UNIT_TO_PIXEL (vals->left_margin);
         }
 
       if (tag->indent_set)
-        dest->indent = vals->indent;
+        dest->indent = GDK_UNIT_TO_PIXEL (vals->indent);
 
       if (tag->rise_set)
         dest->appearance.rise = vals->appearance.rise;
@@ -2267,19 +2255,19 @@ _gtk_text_attributes_fill_from_tags (GtkTextAttrib
       if (tag->right_margin_set) 
         {
           if (tag->accumulative_margin)
-            right_margin_accumulative += vals->right_margin;
+            right_margin_accumulative += GDK_UNIT_TO_PIXEL (vals->right_margin);
           else
-            dest->right_margin = vals->right_margin;
+            dest->right_margin = GDK_UNIT_TO_PIXEL (vals->right_margin);
         }
 
       if (tag->pixels_above_lines_set)
-        dest->pixels_above_lines = vals->pixels_above_lines;
+        dest->pixels_above_lines = GDK_UNIT_TO_PIXEL (vals->pixels_above_lines);
 
       if (tag->pixels_below_lines_set)
-        dest->pixels_below_lines = vals->pixels_below_lines;
+        dest->pixels_below_lines = GDK_UNIT_TO_PIXEL (vals->pixels_below_lines);
 
       if (tag->pixels_inside_wrap_set)
-        dest->pixels_inside_wrap = vals->pixels_inside_wrap;
+        dest->pixels_inside_wrap = GDK_UNIT_TO_PIXEL (vals->pixels_inside_wrap);
 
       if (tag->tabs_set)
         {
Index: gtk/gtkgamma.c
===================================================================
--- gtk/gtkgamma.c	(revision 21028)
+++ gtk/gtkgamma.c	(working copy)
@@ -258,7 +258,7 @@ gtk_gamma_curve_init (GtkGammaCurve *curve)
   curve->gamma = 1.0;
 
   curve->table = gtk_table_new (1, 2, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (curve->table), 3);
+  gtk_table_set_col_spacings (GTK_TABLE (curve->table), GDK_UNIT_ONE_TWELFTH_EM (3));
   gtk_container_add (GTK_CONTAINER (curve), curve->table);
 
   curve->curve = gtk_curve_new ();
@@ -266,7 +266,7 @@ gtk_gamma_curve_init (GtkGammaCurve *curve)
 		    G_CALLBACK (curve_type_changed_callback), curve);
   gtk_table_attach_defaults (GTK_TABLE (curve->table), curve->curve, 0, 1, 0, 1);
 
-  vbox = gtk_vbox_new (/* homogeneous */ FALSE, /* spacing */ 3);
+  vbox = gtk_vbox_new (/* homogeneous */ FALSE, /* spacing */ GDK_UNIT_ONE_TWELFTH_EM (3));
   gtk_table_attach (GTK_TABLE (curve->table), vbox, 1, 2, 0, 1, 0, 0, 0, 0);
 
   /* toggle buttons: */
@@ -412,18 +412,18 @@ button_clicked_callback (GtkWidget *w, gpointer da
 	  vbox = GTK_DIALOG (c->gamma_dialog)->vbox;
 	  
 	  hbox = gtk_hbox_new (/* homogeneous */ FALSE, 0);
-	  gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2);
+	  gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (2));
 	  gtk_widget_show (hbox);
 	  
 	  label = gtk_label_new_with_mnemonic (_("_Gamma value"));
-	  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2);
+	  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, GDK_UNIT_ONE_TWELFTH_EM (2));
 	  gtk_widget_show (label);
 	  
 	  sprintf (buf, "%g", c->gamma);
 	  c->gamma_text = gtk_entry_new ();
           gtk_label_set_mnemonic_widget (GTK_LABEL (label), c->gamma_text);
 	  gtk_entry_set_text (GTK_ENTRY (c->gamma_text), buf);
-	  gtk_box_pack_start (GTK_BOX (hbox), c->gamma_text, TRUE, TRUE, 2);
+	  gtk_box_pack_start (GTK_BOX (hbox), c->gamma_text, TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (2));
 	  gtk_widget_show (c->gamma_text);
 	  
 	  /* fill in action area: */
Index: gtk/gtktexttag.h
===================================================================
--- gtk/gtktexttag.h	(revision 21028)
+++ gtk/gtktexttag.h	(working copy)
@@ -225,17 +225,17 @@ struct _GtkTextAttributes
 
   gdouble font_scale;
   
-  gint left_margin;
+  GdkUnit left_margin;
 
-  gint indent;  
+  GdkUnit indent;  
 
-  gint right_margin;
+  GdkUnit right_margin;
 
-  gint pixels_above_lines;
+  GdkUnit pixels_above_lines;
 
-  gint pixels_below_lines;
+  GdkUnit pixels_below_lines;
 
-  gint pixels_inside_wrap;
+  GdkUnit pixels_inside_wrap;
 
   PangoTabArray *tabs;
 
Index: gtk/gtktreeviewcolumn.c
===================================================================
--- gtk/gtktreeviewcolumn.c	(revision 21028)
+++ gtk/gtktreeviewcolumn.c	(working copy)
@@ -212,13 +212,11 @@ gtk_tree_view_column_class_init (GtkTreeViewColumn
 						     GTK_PARAM_READABLE));
   g_object_class_install_property (object_class,
                                    PROP_SPACING,
-                                   g_param_spec_int ("spacing",
-						     P_("Spacing"),
-						     P_("Space which is inserted between cells"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("spacing",
+                                                        P_("Spacing"),
+                                                        P_("Space which is inserted between cells"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
   g_object_class_install_property (object_class,
                                    PROP_SIZING,
                                    g_param_spec_enum ("sizing",
@@ -230,33 +228,27 @@ gtk_tree_view_column_class_init (GtkTreeViewColumn
   
   g_object_class_install_property (object_class,
                                    PROP_FIXED_WIDTH,
-                                   g_param_spec_int ("fixed-width",
-                                                     P_("Fixed Width"),
-                                                     P_("Current fixed width of the column"),
-                                                     1,
-                                                     G_MAXINT,
-                                                     1, /* not useful */
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("fixed-width",
+                                                        P_("Fixed Width"),
+                                                        P_("Current fixed width of the column"),
+                                                        1, /* not useful */
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_MIN_WIDTH,
-                                   g_param_spec_int ("min-width",
-                                                     P_("Minimum Width"),
-                                                     P_("Minimum allowed width of the column"),
-                                                     -1,
-                                                     G_MAXINT,
-                                                     -1,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("min-width",
+                                                        P_("Minimum Width"),
+                                                        P_("Minimum allowed width of the column"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_MAX_WIDTH,
-                                   g_param_spec_int ("max-width",
-                                                     P_("Maximum Width"),
-                                                     P_("Maximum allowed width of the column"),
-                                                     -1,
-                                                     G_MAXINT,
-                                                     -1,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("max-width",
+                                                        P_("Maximum Width"),
+                                                        P_("Maximum allowed width of the column"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
                                    PROP_TITLE,
@@ -439,22 +431,22 @@ gtk_tree_view_column_set_property (GObject
 
     case PROP_FIXED_WIDTH:
       gtk_tree_view_column_set_fixed_width (tree_column,
-					    g_value_get_int (value));
+					    gdk_value_get_unit (value));
       break;
 
     case PROP_MIN_WIDTH:
       gtk_tree_view_column_set_min_width (tree_column,
-                                          g_value_get_int (value));
+                                          gdk_value_get_unit (value));
       break;
 
     case PROP_MAX_WIDTH:
       gtk_tree_view_column_set_max_width (tree_column,
-                                          g_value_get_int (value));
+                                          gdk_value_get_unit (value));
       break;
 
     case PROP_SPACING:
       gtk_tree_view_column_set_spacing (tree_column,
-					g_value_get_int (value));
+					gdk_value_get_unit (value));
       break;
 
     case PROP_TITLE:
@@ -531,8 +523,8 @@ gtk_tree_view_column_get_property (GObject
       break;
 
     case PROP_SPACING:
-      g_value_set_int (value,
-                       gtk_tree_view_column_get_spacing (tree_column));
+      gdk_value_set_unit (value,
+                          gtk_tree_view_column_get_spacing_unit (tree_column));
       break;
 
     case PROP_SIZING:
@@ -541,18 +533,18 @@ gtk_tree_view_column_get_property (GObject
       break;
 
     case PROP_FIXED_WIDTH:
-      g_value_set_int (value,
-                       gtk_tree_view_column_get_fixed_width (tree_column));
+      gdk_value_set_unit (value,
+                          gtk_tree_view_column_get_fixed_width_unit (tree_column));
       break;
 
     case PROP_MIN_WIDTH:
-      g_value_set_int (value,
-                       gtk_tree_view_column_get_min_width (tree_column));
+      gdk_value_set_unit (value,
+                          gtk_tree_view_column_get_min_width_unit (tree_column));
       break;
 
     case PROP_MAX_WIDTH:
-      g_value_set_int (value,
-                       gtk_tree_view_column_get_max_width (tree_column));
+      gdk_value_set_unit (value,
+                          gtk_tree_view_column_get_max_width_unit (tree_column));
       break;
 
     case PROP_TITLE:
@@ -825,7 +817,7 @@ gtk_tree_view_column_create_button (GtkTreeViewCol
 
   tree_column->alignment = gtk_alignment_new (tree_column->xalign, 0.5, 0.0, 0.0);
 
-  hbox = gtk_hbox_new (FALSE, 2);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (2));
   tree_column->arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_IN);
 
   if (tree_column->child)
@@ -1698,7 +1690,7 @@ gtk_tree_view_column_clear_attributes (GtkTreeView
  **/
 void
 gtk_tree_view_column_set_spacing (GtkTreeViewColumn *tree_column,
-				  gint               spacing)
+				  GdkUnit            spacing)
 {
   g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
   g_return_if_fail (spacing >= 0);
@@ -1724,6 +1716,24 @@ gtk_tree_view_column_get_spacing (GtkTreeViewColum
 {
   g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
 
+  return GDK_UNIT_TO_PIXEL (tree_column->spacing);
+}
+
+/**
+ * gtk_tree_view_column_get_spacing_unit:
+ * @tree_column: A #GtkTreeViewColumn.
+ * 
+ * Like gtk_tree_view_column_get_spacing() but preserve the unit.
+ * 
+ * Return value: the spacing of @tree_column.
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_tree_view_column_get_spacing_unit (GtkTreeViewColumn *tree_column)
+{
+  g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
+
   return tree_column->spacing;
 }
 
@@ -1902,7 +1912,7 @@ gtk_tree_view_column_get_width (GtkTreeViewColumn
  **/
 void
 gtk_tree_view_column_set_fixed_width (GtkTreeViewColumn *tree_column,
-				      gint               fixed_width)
+				      GdkUnit            fixed_width)
 {
   g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
   g_return_if_fail (fixed_width > 0);
@@ -1934,6 +1944,24 @@ gtk_tree_view_column_get_fixed_width (GtkTreeViewC
 {
   g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
 
+  return GDK_UNIT_TO_PIXEL (tree_column->fixed_width);
+}
+
+/**
+ * gtk_tree_view_column_get_fixed_width_unit:
+ * @tree_column: a #GtkTreeViewColumn
+ * 
+ * Like gtk_tree_view_column_get_fixed_width() but preserves the unit.
+ * 
+ * Return value: the fixed width of the column
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_tree_view_column_get_fixed_width_unit (GtkTreeViewColumn *tree_column)
+{
+  g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), 0);
+
   return tree_column->fixed_width;
 }
 
@@ -1947,7 +1975,7 @@ gtk_tree_view_column_get_fixed_width (GtkTreeViewC
  **/
 void
 gtk_tree_view_column_set_min_width (GtkTreeViewColumn *tree_column,
-				    gint               min_width)
+				    GdkUnit            min_width)
 {
   g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
   g_return_if_fail (min_width >= -1);
@@ -1959,13 +1987,13 @@ gtk_tree_view_column_set_min_width (GtkTreeViewCol
       tree_column->tree_view != NULL &&
       GTK_WIDGET_REALIZED (tree_column->tree_view))
     {
-      if (min_width > tree_column->width)
+      if (GDK_UNIT_TO_PIXEL (min_width) > tree_column->width)
 	gtk_widget_queue_resize (tree_column->tree_view);
     }
 
   tree_column->min_width = min_width;
   g_object_freeze_notify (G_OBJECT (tree_column));
-  if (tree_column->max_width != -1 && tree_column->max_width < min_width)
+  if (tree_column->max_width != -1 && GDK_UNIT_TO_PIXEL (tree_column->max_width) < GDK_UNIT_TO_PIXEL (min_width))
     {
       tree_column->max_width = min_width;
       g_object_notify (G_OBJECT (tree_column), "max-width");
@@ -1992,6 +2020,24 @@ gtk_tree_view_column_get_min_width (GtkTreeViewCol
 {
   g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), -1);
 
+  return GDK_UNIT_TO_PIXEL (tree_column->min_width);
+}
+
+/**
+ * gtk_tree_view_column_get_min_width_unit:
+ * @tree_column: A #GtkTreeViewColumn.
+ * 
+ * Like gtk_tree_view_column_get_min_width() but preserves the unit.
+ * 
+ * Return value: The minimum width of the @tree_column.
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_tree_view_column_get_min_width_unit (GtkTreeViewColumn *tree_column)
+{
+  g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), -1);
+
   return tree_column->min_width;
 }
 
@@ -2007,7 +2053,7 @@ gtk_tree_view_column_get_min_width (GtkTreeViewCol
  **/
 void
 gtk_tree_view_column_set_max_width (GtkTreeViewColumn *tree_column,
-				    gint               max_width)
+				    GdkUnit            max_width)
 {
   g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
   g_return_if_fail (max_width >= -1);
@@ -2019,13 +2065,13 @@ gtk_tree_view_column_set_max_width (GtkTreeViewCol
       tree_column->tree_view != NULL &&
       GTK_WIDGET_REALIZED (tree_column->tree_view))
     {
-      if (max_width != -1 && max_width < tree_column->width)
+      if (max_width != -1 && GDK_UNIT_TO_PIXEL (max_width) < tree_column->width)
 	gtk_widget_queue_resize (tree_column->tree_view);
     }
 
   tree_column->max_width = max_width;
   g_object_freeze_notify (G_OBJECT (tree_column));
-  if (max_width != -1 && max_width < tree_column->min_width)
+  if (max_width != -1 && GDK_UNIT_TO_PIXEL (max_width) < GDK_UNIT_TO_PIXEL (tree_column->min_width))
     {
       tree_column->min_width = max_width;
       g_object_notify (G_OBJECT (tree_column), "min-width");
@@ -2052,6 +2098,24 @@ gtk_tree_view_column_get_max_width (GtkTreeViewCol
 {
   g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), -1);
 
+  return GDK_UNIT_TO_PIXEL (tree_column->max_width);
+}
+
+/**
+ * gtk_tree_view_column_get_max_width_unit:
+ * @tree_column: A #GtkTreeViewColumn.
+ * 
+ * Like gtk_tree_view_column_get_max_width() but preserves the unit.
+ * 
+ * Return value: The maximum width of the @tree_column.
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_tree_view_column_get_max_width_unit (GtkTreeViewColumn *tree_column)
+{
+  g_return_val_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column), -1);
+
   return tree_column->max_width;
 }
 
@@ -2607,7 +2671,7 @@ gtk_tree_view_column_cell_get_size (GtkTreeViewCol
 	continue;
 
       if (first_cell == FALSE && width)
-	*width += tree_column->spacing;
+	*width += GDK_UNIT_TO_PIXEL (tree_column->spacing);
 
       gtk_cell_renderer_get_size (info->cell,
 				  tree_column->tree_view,
@@ -2736,7 +2800,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeV
       full_requested_width += info->requested_width;
 
       if (!first_cell)
-	full_requested_width += tree_column->spacing;
+	full_requested_width += GDK_UNIT_TO_PIXEL (tree_column->spacing);
 
       first_cell = FALSE;
     }
@@ -2915,8 +2979,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeV
 
       flags &= ~GTK_CELL_RENDERER_FOCUSED;
 
-      real_cell_area.x += (real_cell_area.width + 2 * focus_line_width + tree_column->spacing);
-      real_background_area.x += real_background_area.width + tree_column->spacing;
+      real_cell_area.x += (real_cell_area.width + 2 * focus_line_width + GDK_UNIT_TO_PIXEL (tree_column->spacing));
+      real_background_area.x += real_background_area.width + GDK_UNIT_TO_PIXEL (tree_column->spacing);
 
       /* Only needed for first cell */
       depth = 0;
@@ -3079,8 +3143,8 @@ gtk_tree_view_column_cell_process_action (GtkTreeV
 
       flags &= ~GTK_CELL_RENDERER_FOCUSED;
 
-      real_cell_area.x += (real_cell_area.width + 2 * focus_line_width + tree_column->spacing);
-      real_background_area.x += (real_background_area.width + tree_column->spacing);
+      real_cell_area.x += (real_cell_area.width + 2 * focus_line_width + GDK_UNIT_TO_PIXEL (tree_column->spacing));
+      real_background_area.x += (real_background_area.width + GDK_UNIT_TO_PIXEL (tree_column->spacing));
 
       /* Only needed for first cell */
       depth = 0;
@@ -3641,7 +3705,7 @@ _gtk_tree_view_column_get_neighbor_sizes (GtkTreeV
 	break;
       
       if (info->cell->visible)
-	l += info->real_width + column->spacing;
+	l += info->real_width + GDK_UNIT_TO_PIXEL (column->spacing);
     }
 
   while (list)
@@ -3651,7 +3715,7 @@ _gtk_tree_view_column_get_neighbor_sizes (GtkTreeV
       list = gtk_tree_view_column_cell_next (column, list);
 
       if (info->cell->visible)
-	r += info->real_width + column->spacing;
+	r += info->real_width + GDK_UNIT_TO_PIXEL (column->spacing);
     }
 
   rtl = (gtk_widget_get_direction (GTK_WIDGET (column->tree_view)) == GTK_TEXT_DIR_RTL);
Index: gtk/gtkcellrenderertoggle.c
===================================================================
--- gtk/gtkcellrenderertoggle.c	(revision 21028)
+++ gtk/gtkcellrenderertoggle.c	(working copy)
@@ -71,7 +71,7 @@ enum {
   PROP_INDICATOR_SIZE
 };
 
-#define TOGGLE_WIDTH 13
+#define TOGGLE_WIDTH GDK_UNIT_ONE_TWELFTH_EM(13)
 
 static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
 
@@ -154,13 +154,11 @@ gtk_cell_renderer_toggle_class_init (GtkCellRender
 
   g_object_class_install_property (object_class,
 				   PROP_INDICATOR_SIZE,
-				   g_param_spec_int ("indicator-size",
-						     P_("Indicator size"),
-						     P_("Size of check or radio indicator"),
-						     0,
-						     G_MAXINT,
-						     TOGGLE_WIDTH,
-						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("indicator-size",
+                                                        P_("Indicator size"),
+                                                        P_("Size of check or radio indicator"),
+                                                        TOGGLE_WIDTH,
+                                                        GTK_PARAM_READWRITE));
 
   
   /**
@@ -210,7 +208,7 @@ gtk_cell_renderer_toggle_get_property (GObject
       g_value_set_boolean (value, celltoggle->radio);
       break;
     case PROP_INDICATOR_SIZE:
-      g_value_set_int (value, priv->indicator_size);
+      gdk_value_set_unit (value, priv->indicator_size);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -245,7 +243,7 @@ gtk_cell_renderer_toggle_set_property (GObject
       celltoggle->radio = g_value_get_boolean (value);
       break;
     case PROP_INDICATOR_SIZE:
-      priv->indicator_size = g_value_get_int (value);
+      priv->indicator_size = gdk_value_get_unit (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -287,8 +285,8 @@ gtk_cell_renderer_toggle_get_size (GtkCellRenderer
 
   priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
 
-  calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
-  calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
+  calc_width = (gint) cell->xpad * 2 + GDK_UNIT_TO_PIXEL (priv->indicator_size);
+  calc_height = (gint) cell->ypad * 2 + GDK_UNIT_TO_PIXEL (priv->indicator_size);
 
   if (width)
     *width = calc_width;
Index: gtk/gtktreeviewcolumn.h
===================================================================
--- gtk/gtktreeviewcolumn.h	(revision 21028)
+++ gtk/gtktreeviewcolumn.h	(working copy)
@@ -72,7 +72,7 @@ struct _GtkTreeViewColumn
   GtkCellEditable *GSEAL (editable_widget);
   gfloat GSEAL (xalign);
   guint GSEAL (property_changed_signal);
-  gint GSEAL (spacing);
+  GdkUnit GSEAL (spacing);
 
   /* Sizing fields */
   /* see gtk+/doc/tree-column-sizing.txt for more information on them */
@@ -81,9 +81,9 @@ struct _GtkTreeViewColumn
   gint GSEAL (button_request);
   gint GSEAL (resized_width);
   gint GSEAL (width);
-  gint GSEAL (fixed_width);
-  gint GSEAL (min_width);
-  gint GSEAL (max_width);
+  GdkUnit GSEAL (fixed_width);
+  GdkUnit GSEAL (min_width);
+  GdkUnit GSEAL (max_width);
 
   /* dragging columns */
   gint GSEAL (drag_x);
@@ -151,8 +151,9 @@ void                    gtk_tree_view_column_set_c
 void                    gtk_tree_view_column_clear_attributes    (GtkTreeViewColumn       *tree_column,
 								  GtkCellRenderer         *cell_renderer);
 void                    gtk_tree_view_column_set_spacing         (GtkTreeViewColumn       *tree_column,
-								  gint                     spacing);
+								  GdkUnit                  spacing);
 gint                    gtk_tree_view_column_get_spacing         (GtkTreeViewColumn       *tree_column);
+GdkUnit                 gtk_tree_view_column_get_spacing_unit    (GtkTreeViewColumn       *tree_column);
 void                    gtk_tree_view_column_set_visible         (GtkTreeViewColumn       *tree_column,
 								  gboolean                 visible);
 gboolean                gtk_tree_view_column_get_visible         (GtkTreeViewColumn       *tree_column);
@@ -164,14 +165,17 @@ void                    gtk_tree_view_column_set_s
 GtkTreeViewColumnSizing gtk_tree_view_column_get_sizing          (GtkTreeViewColumn       *tree_column);
 gint                    gtk_tree_view_column_get_width           (GtkTreeViewColumn       *tree_column);
 gint                    gtk_tree_view_column_get_fixed_width     (GtkTreeViewColumn       *tree_column);
+GdkUnit                 gtk_tree_view_column_get_fixed_width_unit(GtkTreeViewColumn       *tree_column);
 void                    gtk_tree_view_column_set_fixed_width     (GtkTreeViewColumn       *tree_column,
-								  gint                     fixed_width);
+								  GdkUnit                  fixed_width);
 void                    gtk_tree_view_column_set_min_width       (GtkTreeViewColumn       *tree_column,
-								  gint                     min_width);
+								  GdkUnit                  min_width);
 gint                    gtk_tree_view_column_get_min_width       (GtkTreeViewColumn       *tree_column);
+GdkUnit                 gtk_tree_view_column_get_min_width_unit  (GtkTreeViewColumn       *tree_column);
 void                    gtk_tree_view_column_set_max_width       (GtkTreeViewColumn       *tree_column,
-								  gint                     max_width);
+								  GdkUnit                  max_width);
 gint                    gtk_tree_view_column_get_max_width       (GtkTreeViewColumn       *tree_column);
+GdkUnit                 gtk_tree_view_column_get_max_width_unit  (GtkTreeViewColumn       *tree_column);
 void                    gtk_tree_view_column_clicked             (GtkTreeViewColumn       *tree_column);
 
 
Index: gtk/gtkfilechooserdefault.c
===================================================================
--- gtk/gtkfilechooserdefault.c	(revision 21028)
+++ gtk/gtkfilechooserdefault.c	(working copy)
@@ -252,7 +252,7 @@ typedef enum {
 /* Icon size for if we can't get it from the theme */
 #define FALLBACK_ICON_SIZE 16
 
-#define PREVIEW_HBOX_SPACING 12
+#define PREVIEW_HBOX_SPACING GDK_UNIT_ONE_TWELFTH_EM(12)
 #define NUM_LINES 45
 #define NUM_CHARS 60
 
@@ -800,7 +800,7 @@ _gtk_file_chooser_default_init (GtkFileChooserDefa
   impl->operation_mode = OPERATION_MODE_BROWSE;
   impl->recent_manager = gtk_recent_manager_get_default ();
 
-  gtk_box_set_spacing (GTK_BOX (impl), 12);
+  gtk_box_set_spacing (GTK_BOX (impl), GDK_UNIT_ONE_TWELFTH_EM (12));
 
   set_file_system_backend (impl);
 
@@ -3952,7 +3952,7 @@ shortcuts_pane_create (GtkFileChooserDefault *impl
   GtkWidget *hbox;
   GtkWidget *widget;
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_widget_show (vbox);
 
   /* Shortcuts tree */
@@ -3962,7 +3962,7 @@ shortcuts_pane_create (GtkFileChooserDefault *impl
 
   /* Box for buttons */
 
-  hbox = gtk_hbox_new (TRUE, 6);
+  hbox = gtk_hbox_new (TRUE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_size_group_add_widget (size_group, hbox);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
@@ -4640,7 +4640,7 @@ file_pane_create (GtkFileChooserDefault *impl,
   GtkWidget *hbox;
   GtkWidget *widget;
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_widget_show (vbox);
 
   /* Box for lists and preview */
@@ -4656,13 +4656,13 @@ file_pane_create (GtkFileChooserDefault *impl,
 
   /* Preview */
 
-  impl->preview_box = gtk_vbox_new (FALSE, 12);
+  impl->preview_box = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_start (GTK_BOX (hbox), impl->preview_box, FALSE, FALSE, 0);
   /* Don't show preview box initially */
 
   /* Filter combo */
 
-  impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
+  impl->filter_combo_hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
 
   widget = filter_create (impl);
 
@@ -4814,13 +4814,13 @@ save_widgets_create (GtkFileChooserDefault *impl)
 
   location_switch_to_path_bar (impl);
 
-  vbox = gtk_vbox_new (FALSE, 12);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
 
   table = gtk_table_new (2, 2, FALSE);
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
   gtk_widget_show (table);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 12);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
 
   /* Label */
 
@@ -5154,10 +5154,10 @@ browse_widgets_create (GtkFileChooserDefault *impl
 
   /* size group is used by the [+][-] buttons and the filter combo */
   size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
-  vbox = gtk_vbox_new (FALSE, 12);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
 
   /* Location widgets */
-  hbox = gtk_hbox_new (FALSE, 12);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
   impl->browse_path_bar_hbox = hbox;
@@ -5180,7 +5180,7 @@ browse_widgets_create (GtkFileChooserDefault *impl
 
   /* Box for the location label and entry */
 
-  impl->location_entry_box = gtk_hbox_new (FALSE, 12);
+  impl->location_entry_box = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_start (GTK_BOX (vbox), impl->location_entry_box, FALSE, FALSE, 0);
 
   impl->location_label = gtk_label_new_with_mnemonic (_("_Location:"));
@@ -5885,7 +5885,7 @@ gtk_file_chooser_default_size_allocate (GtkWidget
   if (impl->preview_widget_active &&
       impl->preview_widget &&
       GTK_WIDGET_DRAWABLE (impl->preview_widget))
-    impl->default_width -= impl->preview_widget->allocation.width + PREVIEW_HBOX_SPACING;
+    impl->default_width -= impl->preview_widget->allocation.width + GDK_UNIT_TO_PIXEL (PREVIEW_HBOX_SPACING);
 
   if (impl->extra_widget &&
       GTK_WIDGET_DRAWABLE (impl->extra_widget))
@@ -7809,7 +7809,7 @@ gtk_file_chooser_default_get_default_size (GtkFile
       GTK_WIDGET_VISIBLE (impl->preview_widget))
     {
       gtk_widget_size_request (impl->preview_box, &req);
-      *default_width += PREVIEW_HBOX_SPACING + req.width;
+      *default_width += GDK_UNIT_TO_PIXEL (PREVIEW_HBOX_SPACING) + req.width;
     }
 
   if (impl->extra_widget &&
@@ -9142,7 +9142,7 @@ search_setup_widgets (GtkFileChooserDefault *impl)
 {
   GtkWidget *label;
 
-  impl->search_hbox = gtk_hbox_new (FALSE, 12);
+  impl->search_hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
 
   /* Label */
 
Index: gtk/gtkaboutdialog.c
===================================================================
--- gtk/gtkaboutdialog.c	(revision 21028)
+++ gtk/gtkaboutdialog.c	(working copy)
@@ -447,15 +447,15 @@ gtk_about_dialog_init (GtkAboutDialog *about)
   priv->wrap_license = FALSE;
 
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
 
   /* Widgets */
   gtk_widget_push_composite_child ();
 
-  vbox = gtk_vbox_new (FALSE, 8);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (dialog->vbox), vbox, TRUE, TRUE, 0);
 
   priv->logo_image = gtk_image_new ();
@@ -2034,12 +2034,12 @@ display_credits_dialog (GtkWidget *button,
 					NULL);
   credits_dialog = GTK_DIALOG (dialog);
   gtk_dialog_set_has_separator (credits_dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (credits_dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (credits_dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (credits_dialog->action_area), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (credits_dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (credits_dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (credits_dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
 
   priv->credits_dialog = dialog;
-  gtk_window_set_default_size (GTK_WINDOW (dialog), 360, 260);
+  gtk_window_set_default_size (GTK_WINDOW (dialog), GDK_UNIT_ONE_TWELFTH_EM (360), GDK_UNIT_ONE_TWELFTH_EM (260));
   gtk_dialog_set_default_response (credits_dialog, GTK_RESPONSE_CANCEL);
 
   gtk_window_set_modal (GTK_WINDOW (dialog), 
@@ -2052,7 +2052,7 @@ display_credits_dialog (GtkWidget *button,
 		    &(priv->credits_dialog));
 
   notebook = gtk_notebook_new ();
-  gtk_container_set_border_width (GTK_CONTAINER (notebook), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (notebook), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), notebook, TRUE, TRUE, 0);
 
   if (priv->authors != NULL) 
@@ -2110,12 +2110,12 @@ display_license_dialog (GtkWidget *button,
 					NULL);
   licence_dialog = GTK_DIALOG (dialog);
   gtk_dialog_set_has_separator (licence_dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (licence_dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (licence_dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (licence_dialog->action_area), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (licence_dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (licence_dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (licence_dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
 
   priv->license_dialog = dialog;
-  gtk_window_set_default_size (GTK_WINDOW (dialog), 420, 320);
+  gtk_window_set_default_size (GTK_WINDOW (dialog), GDK_UNIT_ONE_TWELFTH_EM (420), GDK_UNIT_ONE_TWELFTH_EM (320));
   gtk_dialog_set_default_response (licence_dialog, GTK_RESPONSE_CANCEL);
 
   gtk_window_set_modal (GTK_WINDOW (dialog), 
@@ -2128,7 +2128,7 @@ display_license_dialog (GtkWidget *button,
 		    &(priv->license_dialog));
 
   sw = gtk_scrolled_window_new (NULL, NULL);
-  gtk_container_set_border_width (GTK_CONTAINER (sw), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (sw), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
 				       GTK_SHADOW_IN);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
Index: gtk/gtkfontbutton.c
===================================================================
--- gtk/gtkfontbutton.c	(revision 21028)
+++ gtk/gtkfontbutton.c	(working copy)
@@ -780,13 +780,13 @@ gtk_font_button_create_inside (GtkFontButton *font
   font_button->priv->font_label = gtk_label_new (_("Font"));
   
   gtk_label_set_justify (GTK_LABEL (font_button->priv->font_label), GTK_JUSTIFY_LEFT);
-  gtk_box_pack_start (GTK_BOX (widget), font_button->priv->font_label, TRUE, TRUE, 5);
+  gtk_box_pack_start (GTK_BOX (widget), font_button->priv->font_label, TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
 
   if (font_button->priv->show_size) 
     {
       gtk_box_pack_start (GTK_BOX (widget), gtk_vseparator_new (), FALSE, FALSE, 0);
       font_button->priv->size_label = gtk_label_new ("14");
-      gtk_box_pack_start (GTK_BOX (widget), font_button->priv->size_label, FALSE, FALSE, 5);
+      gtk_box_pack_start (GTK_BOX (widget), font_button->priv->size_label, FALSE, FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
     }
 
   gtk_widget_show_all (widget);
Index: gtk/gtkalignment.c
===================================================================
--- gtk/gtkalignment.c	(revision 21028)
+++ gtk/gtkalignment.c	(working copy)
@@ -48,10 +48,10 @@ enum {
 
 struct _GtkAlignmentPrivate
 {
-  guint padding_top;
-  guint padding_bottom;
-  guint padding_left;
-  guint padding_right;
+  GdkUUnit padding_top;
+  GdkUUnit padding_bottom;
+  GdkUUnit padding_left;
+  GdkUUnit padding_right;
 };
 
 static void gtk_alignment_size_request  (GtkWidget         *widget,
@@ -132,13 +132,11 @@ gtk_alignment_class_init (GtkAlignmentClass *class
  */
   g_object_class_install_property (gobject_class,
                                    PROP_TOP_PADDING,
-                                   g_param_spec_uint("top-padding",
-                                                      P_("Top Padding"),
-                                                      P_("The padding to insert at the top of the widget."),
-                                                      0,
-                                                      G_MAXINT,
-                                                      0,
-                                                      GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit("top-padding",
+                                                        P_("Top Padding"),
+                                                        P_("The padding to insert at the top of the widget."),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
 /**
  * GtkAlignment:bottom-padding:
@@ -149,13 +147,11 @@ gtk_alignment_class_init (GtkAlignmentClass *class
  */
   g_object_class_install_property (gobject_class,
                                    PROP_BOTTOM_PADDING,
-                                   g_param_spec_uint("bottom-padding",
-                                                      P_("Bottom Padding"),
-                                                      P_("The padding to insert at the bottom of the widget."),
-                                                      0,
-                                                      G_MAXINT,
-                                                      0,
-                                                      GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit("bottom-padding",
+                                                        P_("Bottom Padding"),
+                                                        P_("The padding to insert at the bottom of the widget."),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
 /**
  * GtkAlignment:left-padding:
@@ -166,13 +162,11 @@ gtk_alignment_class_init (GtkAlignmentClass *class
  */
   g_object_class_install_property (gobject_class,
                                    PROP_LEFT_PADDING,
-                                   g_param_spec_uint("left-padding",
-                                                      P_("Left Padding"),
-                                                      P_("The padding to insert at the left of the widget."),
-                                                      0,
-                                                      G_MAXINT,
-                                                      0,
-                                                      GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit("left-padding",
+                                                        P_("Left Padding"),
+                                                        P_("The padding to insert at the left of the widget."),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
 /**
  * GtkAlignment:right-padding:
@@ -183,13 +177,11 @@ gtk_alignment_class_init (GtkAlignmentClass *class
  */
   g_object_class_install_property (gobject_class,
                                    PROP_RIGHT_PADDING,
-                                   g_param_spec_uint("right-padding",
-                                                      P_("Right Padding"),
-                                                      P_("The padding to insert at the right of the widget."),
-                                                      0,
-                                                      G_MAXINT,
-                                                      0,
-                                                      GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit("right-padding",
+                                                        P_("Right Padding"),
+                                                        P_("The padding to insert at the right of the widget."),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_type_class_add_private (gobject_class, sizeof (GtkAlignmentPrivate));  
 }
@@ -279,7 +271,7 @@ gtk_alignment_set_property (GObject         *objec
     /* Padding: */
     case PROP_TOP_PADDING:
       gtk_alignment_set_padding (alignment,
-			 g_value_get_uint (value),
+			 gdk_value_get_uunit (value),
 			 priv->padding_bottom,
 			 priv->padding_left,
 			 priv->padding_right);
@@ -287,7 +279,7 @@ gtk_alignment_set_property (GObject         *objec
     case PROP_BOTTOM_PADDING:
       gtk_alignment_set_padding (alignment,
 			 priv->padding_top,
-			 g_value_get_uint (value),
+			 gdk_value_get_uunit (value),
 			 priv->padding_left,
 			 priv->padding_right);
       break;
@@ -295,7 +287,7 @@ gtk_alignment_set_property (GObject         *objec
       gtk_alignment_set_padding (alignment,
 			 priv->padding_top,
 			 priv->padding_bottom,
-			 g_value_get_uint (value),
+			 gdk_value_get_uunit (value),
 			 priv->padding_right);
       break;
     case PROP_RIGHT_PADDING:
@@ -303,7 +295,7 @@ gtk_alignment_set_property (GObject         *objec
 			 priv->padding_top,
 			 priv->padding_bottom,
 			 priv->padding_left,
-			 g_value_get_uint (value));
+			 gdk_value_get_uunit (value));
       break;
     
     default:
@@ -341,16 +333,16 @@ gtk_alignment_get_property (GObject         *objec
 
     /* Padding: */
     case PROP_TOP_PADDING:
-      g_value_set_uint (value, priv->padding_top);
+      gdk_value_set_uunit (value, priv->padding_top);
       break;
     case PROP_BOTTOM_PADDING:
-      g_value_set_uint (value, priv->padding_bottom);
+      gdk_value_set_uunit (value, priv->padding_bottom);
       break;
     case PROP_LEFT_PADDING:
-      g_value_set_uint (value, priv->padding_left);
+      gdk_value_set_uunit (value, priv->padding_left);
       break;
     case PROP_RIGHT_PADDING:
-      g_value_set_uint (value, priv->padding_right);
+      gdk_value_set_uunit (value, priv->padding_right);
       break;
       
     default:
@@ -431,8 +423,8 @@ gtk_alignment_size_request (GtkWidget      *widget
       requisition->height += child_requisition.height;
 
       /* Request extra space for the padding: */
-      requisition->width += (priv->padding_left + priv->padding_right);
-      requisition->height += (priv->padding_top + priv->padding_bottom);
+      requisition->width += (GDK_UNIT_TO_PIXEL (priv->padding_left) + GDK_UNIT_TO_PIXEL (priv->padding_right));
+      requisition->height += (GDK_UNIT_TO_PIXEL (priv->padding_top) + GDK_UNIT_TO_PIXEL (priv->padding_bottom));
     }
 }
 
@@ -463,8 +455,8 @@ gtk_alignment_size_allocate (GtkWidget     *widget
       border_width = GTK_CONTAINER (alignment)->border_width;
 
       priv = GTK_ALIGNMENT_GET_PRIVATE (widget);
-      padding_horizontal = priv->padding_left + priv->padding_right;
-      padding_vertical = priv->padding_top + priv->padding_bottom;
+      padding_horizontal = GDK_UNIT_TO_PIXEL (priv->padding_left) + GDK_UNIT_TO_PIXEL (priv->padding_right);
+      padding_vertical = GDK_UNIT_TO_PIXEL (priv->padding_top) + GDK_UNIT_TO_PIXEL (priv->padding_bottom);
 
       width = allocation->width - padding_horizontal - 2 * border_width;
       height = allocation->height - padding_vertical - 2 * border_width;
@@ -484,11 +476,11 @@ gtk_alignment_size_allocate (GtkWidget     *widget
 	child_allocation.height = height;
 
       if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
-	child_allocation.x = (1.0 - alignment->xalign) * (width - child_allocation.width) + allocation->x + border_width + priv->padding_right;
+	child_allocation.x = (1.0 - alignment->xalign) * (width - child_allocation.width) + allocation->x + border_width + GDK_UNIT_TO_PIXEL (priv->padding_right);
       else 
-	child_allocation.x = alignment->xalign * (width - child_allocation.width) + allocation->x + border_width + priv->padding_left;
+	child_allocation.x = alignment->xalign * (width - child_allocation.width) + allocation->x + border_width + GDK_UNIT_TO_PIXEL (priv->padding_left);
 
-      child_allocation.y = alignment->yalign * (height - child_allocation.height) + allocation->y + border_width + priv->padding_top;
+      child_allocation.y = alignment->yalign * (height - child_allocation.height) + allocation->y + border_width + GDK_UNIT_TO_PIXEL (priv->padding_top);
 
       gtk_widget_size_allocate (bin->child, &child_allocation);
     }
@@ -511,10 +503,10 @@ gtk_alignment_size_allocate (GtkWidget     *widget
  */
 void
 gtk_alignment_set_padding (GtkAlignment    *alignment,
-			   guint            padding_top,
-			   guint            padding_bottom,
-			   guint            padding_left,
-			   guint            padding_right)
+			   GdkUUnit         padding_top,
+			   GdkUUnit         padding_bottom,
+			   GdkUUnit         padding_left,
+			   GdkUUnit         padding_right)
 {
   GtkAlignmentPrivate *priv;
   
@@ -580,6 +572,40 @@ gtk_alignment_get_padding (GtkAlignment    *alignm
 
   priv = GTK_ALIGNMENT_GET_PRIVATE (alignment);
   if(padding_top)
+    *padding_top = GDK_UNIT_TO_PIXEL (priv->padding_top);
+  if(padding_bottom)
+    *padding_bottom = GDK_UNIT_TO_PIXEL (priv->padding_bottom);
+  if(padding_left)
+    *padding_left = GDK_UNIT_TO_PIXEL (priv->padding_left);
+  if(padding_right)
+    *padding_right = GDK_UNIT_TO_PIXEL (priv->padding_right);
+}
+
+/**
+ * gtk_alignment_get_padding_unit:
+ * @alignment: a #GtkAlignment
+ * @padding_top: location to store the padding for the top of the widget, or %NULL
+ * @padding_bottom: location to store the padding for the bottom of the widget, or %NULL
+ * @padding_left: location to store the padding for the left of the widget, or %NULL
+ * @padding_right: location to store the padding for the right of the widget, or %NULL
+ *
+ * Like gtk_alignment_get_padding() but preserves the unit.
+ *
+ * Since: 2.14
+ */
+void
+gtk_alignment_get_padding_unit (GtkAlignment    *alignment,
+                                GdkUUnit        *padding_top,
+                                GdkUUnit        *padding_bottom,
+                                GdkUUnit        *padding_left,
+                                GdkUUnit        *padding_right)
+{
+  GtkAlignmentPrivate *priv;
+ 
+  g_return_if_fail (GTK_IS_ALIGNMENT (alignment));
+
+  priv = GTK_ALIGNMENT_GET_PRIVATE (alignment);
+  if(padding_top)
     *padding_top = priv->padding_top;
   if(padding_bottom)
     *padding_bottom = priv->padding_bottom;
Index: gtk/gtkalignment.h
===================================================================
--- gtk/gtkalignment.h	(revision 21028)
+++ gtk/gtkalignment.h	(working copy)
@@ -78,10 +78,10 @@ void       gtk_alignment_set        (GtkAlignment
 				     gfloat             yscale);
 
 void       gtk_alignment_set_padding (GtkAlignment      *alignment,
-				      guint              padding_top,
-				      guint              padding_bottom,
-				      guint              padding_left,
-				      guint              padding_right);
+				      GdkUUnit           padding_top,
+				      GdkUUnit           padding_bottom,
+				      GdkUUnit           padding_left,
+				      GdkUUnit           padding_right);
 
 void       gtk_alignment_get_padding (GtkAlignment      *alignment,
 				      guint             *padding_top,
@@ -89,6 +89,12 @@ void       gtk_alignment_get_padding (GtkAlignment
 				      guint             *padding_left,
 				      guint             *padding_right);
 
+void       gtk_alignment_get_padding_unit (GtkAlignment      *alignment,
+                                           GdkUUnit          *padding_top,
+                                           GdkUUnit          *padding_bottom,
+                                           GdkUUnit          *padding_left,
+                                           GdkUUnit          *padding_right);
+
 G_END_DECLS
 
 
Index: gtk/gtkfilechooserbutton.c
===================================================================
--- gtk/gtkfilechooserbutton.c	(revision 21028)
+++ gtk/gtkfilechooserbutton.c	(working copy)
@@ -449,7 +449,7 @@ gtk_file_chooser_button_init (GtkFileChooserButton
   gtk_container_add (GTK_CONTAINER (button), priv->button);
   gtk_widget_show (priv->button);
 
-  box = gtk_hbox_new (FALSE, 4);
+  box = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (4));
   gtk_container_add (GTK_CONTAINER (priv->button), box);
   gtk_widget_show (box);
 
Index: gtk/gtkhandlebox.c
===================================================================
--- gtk/gtkhandlebox.c	(revision 21028)
+++ gtk/gtkhandlebox.c	(working copy)
@@ -54,10 +54,9 @@ enum {
   PROP_CHILD_DETACHED
 };
 
-#define DRAG_HANDLE_SIZE 10
-#define CHILDLESS_SIZE	25
-#define GHOST_HEIGHT 3
-#define TOLERANCE 5
+#define DRAG_HANDLE_SIZE GDK_UNIT_ONE_TWELFTH_EM(10)
+#define CHILDLESS_SIZE	GDK_UNIT_ONE_TWELFTH_EM(25)
+#define TOLERANCE GDK_UNIT_ONE_TWELFTH_EM(5)
 
 enum {
   SIGNAL_CHILD_ATTACHED,
@@ -543,13 +542,13 @@ gtk_handle_box_size_request (GtkWidget      *widge
   if (handle_position == GTK_POS_LEFT ||
       handle_position == GTK_POS_RIGHT)
     {
-      requisition->width = DRAG_HANDLE_SIZE;
+      requisition->width = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       requisition->height = 0;
     }
   else
     {
       requisition->width = 0;
-      requisition->height = DRAG_HANDLE_SIZE;
+      requisition->height = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
     }
 
   /* if our child is not visible, we still request its size, since we
@@ -595,8 +594,8 @@ gtk_handle_box_size_request (GtkWidget      *widge
 	}
       else
 	{
-	  requisition->width += CHILDLESS_SIZE;
-	  requisition->height += CHILDLESS_SIZE;
+	  requisition->width += GDK_UNIT_TO_PIXEL (CHILDLESS_SIZE);
+	  requisition->height += GDK_UNIT_TO_PIXEL (CHILDLESS_SIZE);
 	}
     }
 }
@@ -643,9 +642,9 @@ gtk_handle_box_size_allocate (GtkWidget     *widge
       child_allocation.x = border_width;
       child_allocation.y = border_width;
       if (handle_position == GTK_POS_LEFT)
-	child_allocation.x += DRAG_HANDLE_SIZE;
+	child_allocation.x += GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       else if (handle_position == GTK_POS_TOP)
-	child_allocation.y += DRAG_HANDLE_SIZE;
+	child_allocation.y += GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 
       if (hb->child_detached)
 	{
@@ -660,9 +659,9 @@ gtk_handle_box_size_allocate (GtkWidget     *widge
 	  
 	  if (handle_position == GTK_POS_LEFT ||
 	      handle_position == GTK_POS_RIGHT)
-	    float_width += DRAG_HANDLE_SIZE;
+	    float_width += GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	  else
-	    float_height += DRAG_HANDLE_SIZE;
+	    float_height += GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 
 	  if (GTK_WIDGET_REALIZED (hb))
 	    {
@@ -683,9 +682,9 @@ gtk_handle_box_size_allocate (GtkWidget     *widge
 
 	  if (handle_position == GTK_POS_LEFT ||
 	      handle_position == GTK_POS_RIGHT)
-	    child_allocation.width -= DRAG_HANDLE_SIZE;
+	    child_allocation.width -= GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	  else
-	    child_allocation.height -= DRAG_HANDLE_SIZE;
+	    child_allocation.height -= GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	  
 	  if (GTK_WIDGET_REALIZED (hb))
 	    gdk_window_move_resize (hb->bin_window,
@@ -715,17 +714,17 @@ gtk_handle_box_draw_ghost (GtkHandleBox *hb)
   if (handle_position == GTK_POS_LEFT ||
       handle_position == GTK_POS_RIGHT)
     {
-      x = handle_position == GTK_POS_LEFT ? 0 : widget->allocation.width - DRAG_HANDLE_SIZE;
+      x = handle_position == GTK_POS_LEFT ? 0 : widget->allocation.width - GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       y = 0;
-      width = DRAG_HANDLE_SIZE;
+      width = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       height = widget->allocation.height;
     }
   else
     {
       x = 0;
-      y = handle_position == GTK_POS_TOP ? 0 : widget->allocation.height - DRAG_HANDLE_SIZE;
+      y = handle_position == GTK_POS_TOP ? 0 : widget->allocation.height - GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       width = widget->allocation.width;
-      height = DRAG_HANDLE_SIZE;
+      height = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
     }
   gtk_paint_shadow (widget->style,
 		    widget->window,
@@ -742,16 +741,16 @@ gtk_handle_box_draw_ghost (GtkHandleBox *hb)
 		      widget->window,
 		      GTK_WIDGET_STATE (widget),
 		      NULL, widget, "handlebox",
-		      handle_position == GTK_POS_LEFT ? DRAG_HANDLE_SIZE : 0,
-		      handle_position == GTK_POS_LEFT ? widget->allocation.width : widget->allocation.width - DRAG_HANDLE_SIZE,
+		      handle_position == GTK_POS_LEFT ? GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE) : 0,
+		      handle_position == GTK_POS_LEFT ? widget->allocation.width : widget->allocation.width - GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE),
 		      widget->allocation.height / 2);
    else
      gtk_paint_vline (widget->style,
 		      widget->window,
 		      GTK_WIDGET_STATE (widget),
 		      NULL, widget, "handlebox",
-		      handle_position == GTK_POS_TOP ? DRAG_HANDLE_SIZE : 0,
-		      handle_position == GTK_POS_TOP ? widget->allocation.height : widget->allocation.height - DRAG_HANDLE_SIZE,
+		      handle_position == GTK_POS_TOP ? GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE) : 0,
+		      handle_position == GTK_POS_TOP ? widget->allocation.height : widget->allocation.height - GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE),
 		      widget->allocation.width / 2);
 }
 
@@ -929,14 +928,14 @@ gtk_handle_box_paint (GtkWidget      *widget,
     case GTK_POS_LEFT:
       rect.x = 0;
       rect.y = 0; 
-      rect.width = DRAG_HANDLE_SIZE;
+      rect.width = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       rect.height = height;
       handle_orientation = GTK_ORIENTATION_VERTICAL;
       break;
     case GTK_POS_RIGHT:
-      rect.x = width - DRAG_HANDLE_SIZE; 
+      rect.x = width - GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE); 
       rect.y = 0;
-      rect.width = DRAG_HANDLE_SIZE;
+      rect.width = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       rect.height = height;
       handle_orientation = GTK_ORIENTATION_VERTICAL;
       break;
@@ -944,14 +943,14 @@ gtk_handle_box_paint (GtkWidget      *widget,
       rect.x = 0;
       rect.y = 0; 
       rect.width = width;
-      rect.height = DRAG_HANDLE_SIZE;
+      rect.height = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       handle_orientation = GTK_ORIENTATION_HORIZONTAL;
       break;
     case GTK_POS_BOTTOM:
       rect.x = 0;
-      rect.y = height - DRAG_HANDLE_SIZE;
+      rect.y = height - GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       rect.width = width;
-      rect.height = DRAG_HANDLE_SIZE;
+      rect.height = GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
       handle_orientation = GTK_ORIENTATION_HORIZONTAL;
       break;
     default: 
@@ -1061,10 +1060,10 @@ gtk_handle_box_button_changed (GtkWidget      *wid
 	  switch (handle_position)
 	    {
 	    case GTK_POS_LEFT:
-	      in_handle = event->x < DRAG_HANDLE_SIZE;
+	      in_handle = event->x < GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	      break;
 	    case GTK_POS_TOP:
-	      in_handle = event->y < DRAG_HANDLE_SIZE;
+	      in_handle = event->y < GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	      break;
 	    case GTK_POS_RIGHT:
 	      in_handle = event->x > 2 * GTK_CONTAINER (hb)->border_width + child->allocation.width;
@@ -1219,18 +1218,18 @@ gtk_handle_box_motion (GtkWidget      *widget,
   switch (snap_edge)
     {
     case GTK_POS_TOP:
-      is_snapped = abs (hb->attach_allocation.y - new_y) < TOLERANCE;
+      is_snapped = abs (hb->attach_allocation.y - new_y) < GDK_UNIT_TO_PIXEL (TOLERANCE);
       break;
     case GTK_POS_BOTTOM:
       is_snapped = abs (hb->attach_allocation.y + (gint)hb->attach_allocation.height -
-			new_y - (gint)hb->float_allocation.height) < TOLERANCE;
+			new_y - (gint)hb->float_allocation.height) < GDK_UNIT_TO_PIXEL (TOLERANCE);
       break;
     case GTK_POS_LEFT:
-      is_snapped = abs (hb->attach_allocation.x - new_x) < TOLERANCE;
+      is_snapped = abs (hb->attach_allocation.x - new_x) < GDK_UNIT_TO_PIXEL (TOLERANCE);
       break;
     case GTK_POS_RIGHT:
       is_snapped = abs (hb->attach_allocation.x + (gint)hb->attach_allocation.width -
-			new_x - (gint)hb->float_allocation.width) < TOLERANCE;
+			new_x - (gint)hb->float_allocation.width) < GDK_UNIT_TO_PIXEL (TOLERANCE);
       break;
     }
 
@@ -1262,10 +1261,10 @@ gtk_handle_box_motion (GtkWidget      *widget,
 	  break;
 	}
 
-      is_snapped = ((attach_pos1 - TOLERANCE < float_pos1) && 
-		    (attach_pos2 + TOLERANCE > float_pos2)) ||
-	           ((float_pos1 - TOLERANCE < attach_pos1) &&
-		    (float_pos2 + TOLERANCE > attach_pos2));
+      is_snapped = ((attach_pos1 - GDK_UNIT_TO_PIXEL (TOLERANCE) < float_pos1) && 
+		    (attach_pos2 + GDK_UNIT_TO_PIXEL (TOLERANCE) > float_pos2)) ||
+                   ((float_pos1 - GDK_UNIT_TO_PIXEL (TOLERANCE) < attach_pos1) &&
+                    (float_pos2 + GDK_UNIT_TO_PIXEL (TOLERANCE) > attach_pos2));
     }
 
   if (is_snapped)
@@ -1335,9 +1334,9 @@ gtk_handle_box_motion (GtkWidget      *widget,
 	  height = child_requisition.height + 2 * GTK_CONTAINER (hb)->border_width;
 
 	  if (handle_position == GTK_POS_LEFT || handle_position == GTK_POS_RIGHT)
-	    width += DRAG_HANDLE_SIZE;
+	    width += GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	  else
-	    height += DRAG_HANDLE_SIZE;
+	    height += GDK_UNIT_TO_PIXEL (DRAG_HANDLE_SIZE);
 	  
 	  gdk_window_move_resize (hb->float_window, new_x, new_y, width, height);
 	  gdk_window_reparent (hb->bin_window, hb->float_window, 0, 0);
Index: gtk/gtkrecentchooserdefault.c
===================================================================
--- gtk/gtkrecentchooserdefault.c	(revision 21028)
+++ gtk/gtkrecentchooserdefault.c	(working copy)
@@ -323,7 +323,7 @@ _gtk_recent_chooser_default_class_init (GtkRecentC
 static void
 _gtk_recent_chooser_default_init (GtkRecentChooserDefault *impl)
 {
-  gtk_box_set_spacing (GTK_BOX (impl), 6);
+  gtk_box_set_spacing (GTK_BOX (impl), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   /* by default, we use the global manager */
   impl->local_manager = FALSE;
@@ -444,7 +444,7 @@ gtk_recent_chooser_default_constructor (GType
 		       GDK_ACTION_COPY);
   gtk_drag_source_add_uri_targets (impl->recent_view);
 
-  impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
+  impl->filter_combo_hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   
   impl->filter_combo = gtk_combo_box_new_text ();
   gtk_combo_box_set_focus_on_click (GTK_COMBO_BOX (impl->filter_combo), FALSE);
Index: gtk/gtktextlayout.c
===================================================================
--- gtk/gtktextlayout.c	(revision 21028)
+++ gtk/gtktextlayout.c	(working copy)
@@ -1347,21 +1347,21 @@ set_para_values (GtkTextLayout      *layout,
 
   pango_layout_set_alignment (display->layout, pango_align);
   pango_layout_set_spacing (display->layout,
-                            style->pixels_inside_wrap * PANGO_SCALE);
+                            GDK_UNIT_TO_PIXEL (style->pixels_inside_wrap) * PANGO_SCALE);
 
   if (style->tabs)
     pango_layout_set_tabs (display->layout, style->tabs);
 
-  display->top_margin = style->pixels_above_lines;
-  display->height = style->pixels_above_lines + style->pixels_below_lines;
-  display->bottom_margin = style->pixels_below_lines;
-  display->left_margin = style->left_margin;
-  display->right_margin = style->right_margin;
+  display->top_margin = GDK_UNIT_TO_PIXEL (style->pixels_above_lines);
+  display->height = GDK_UNIT_TO_PIXEL (style->pixels_above_lines) + GDK_UNIT_TO_PIXEL (style->pixels_below_lines);
+  display->bottom_margin = GDK_UNIT_TO_PIXEL (style->pixels_below_lines);
+  display->left_margin = GDK_UNIT_TO_PIXEL (style->left_margin);
+  display->right_margin = GDK_UNIT_TO_PIXEL (style->right_margin);
   
   display->x_offset = display->left_margin;
 
   pango_layout_set_indent (display->layout,
-                           style->indent * PANGO_SCALE);
+                           GDK_UNIT_TO_PIXEL (style->indent) * PANGO_SCALE);
 
   switch (style->wrap_mode)
     {
Index: gtk/gtktreeview.c
===================================================================
--- gtk/gtktreeview.c	(revision 21028)
+++ gtk/gtktreeview.c	(working copy)
@@ -46,11 +46,13 @@
 #include "gtkprivate.h"
 #include "gtkalias.h"
 
+#define MAKE_EVEN(x) do {x = (((x&1) == 0) ? x : x + 1);} while (0)
+
 #define GTK_TREE_VIEW_PRIORITY_VALIDATE (GDK_PRIORITY_REDRAW + 5)
 #define GTK_TREE_VIEW_PRIORITY_SCROLL_SYNC (GTK_TREE_VIEW_PRIORITY_VALIDATE + 2)
 #define GTK_TREE_VIEW_NUM_ROWS_PER_IDLE 500
 #define SCROLL_EDGE_SIZE 15
-#define EXPANDER_EXTRA_PADDING 4
+#define EXPANDER_EXTRA_PADDING GDK_UNIT_ONE_TWELFTH_EM(4)
 #define GTK_TREE_VIEW_SEARCH_DIALOG_TIMEOUT 5000
 #define AUTO_EXPAND_TIMEOUT 500
 
@@ -730,13 +732,11 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
      */
     g_object_class_install_property (o_class,
 				     PROP_LEVEL_INDENTATION,
-				     g_param_spec_int ("level-indentation",
-						       P_("Level Indentation"),
-						       P_("Extra indentation for each level"),
-						       0,
-						       G_MAXINT,
-						       0,
-						       GTK_PARAM_READWRITE));
+				     gdk_param_spec_unit ("level-indentation",
+                                                          P_("Level Indentation"),
+                                                          P_("Extra indentation for each level"),
+                                                          0,
+                                                          GTK_PARAM_READWRITE));
 
     g_object_class_install_property (o_class,
                                      PROP_RUBBER_BANDING,
@@ -774,36 +774,30 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
 						       GTK_PARAM_READWRITE));
 
   /* Style properties */
-#define _TREE_VIEW_EXPANDER_SIZE 12
+#define _TREE_VIEW_EXPANDER_SIZE GDK_UNIT_ONE_TWELFTH_EM(12)
 #define _TREE_VIEW_VERTICAL_SEPARATOR 2
 #define _TREE_VIEW_HORIZONTAL_SEPARATOR 2
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("expander-size",
-							     P_("Expander Size"),
-							     P_("Size of the expander arrow"),
-							     0,
-							     G_MAXINT,
-							     _TREE_VIEW_EXPANDER_SIZE,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("expander-size",
+                                                                P_("Expander Size"),
+                                                                P_("Size of the expander arrow"),
+                                                                _TREE_VIEW_EXPANDER_SIZE,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("vertical-separator",
-							     P_("Vertical Separator Width"),
-							     P_("Vertical space between cells.  Must be an even number"),
-							     0,
-							     G_MAXINT,
-							     _TREE_VIEW_VERTICAL_SEPARATOR,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("vertical-separator",
+                                                                P_("Vertical Separator Width"),
+                                                                P_("Vertical space between cells.  Must be an even number"),
+                                                                _TREE_VIEW_VERTICAL_SEPARATOR,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("horizontal-separator",
-							     P_("Horizontal Separator Width"),
-							     P_("Horizontal space between cells.  Must be an even number"),
-							     0,
-							     G_MAXINT,
-							     _TREE_VIEW_HORIZONTAL_SEPARATOR,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("horizontal-separator",
+                                                                P_("Horizontal Separator Width"),
+                                                                P_("Horizontal space between cells.  Must be an even number"),
+                                                                _TREE_VIEW_HORIZONTAL_SEPARATOR,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
 					   g_param_spec_boolean ("allow-rules",
@@ -841,18 +835,18 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
 								 GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("grid-line-width",
-							     P_("Grid line width"),
-							     P_("Width, in pixels, of the tree view grid lines"),
-							     0, G_MAXINT, 1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("grid-line-width",
+                                                                P_("Grid line width"),
+                                                                P_("Width, in pixels, of the tree view grid lines"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("tree-line-width",
-							     P_("Tree line width"),
-							     P_("Width, in pixels, of the tree view lines"),
-							     0, G_MAXINT, 1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("tree-line-width",
+                                                                P_("Tree line width"),
+                                                                P_("Width, in pixels, of the tree view lines"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
 					   g_param_spec_string ("grid-line-pattern",
@@ -1434,7 +1428,7 @@ gtk_tree_view_set_property (GObject         *objec
       gtk_tree_view_set_show_expanders (tree_view, g_value_get_boolean (value));
       break;
     case PROP_LEVEL_INDENTATION:
-      tree_view->priv->level_indentation = g_value_get_int (value);
+      tree_view->priv->level_indentation = gdk_value_get_unit (value);
       break;
     case PROP_RUBBER_BANDING:
       tree_view->priv->rubber_banding_enable = g_value_get_boolean (value);
@@ -1509,7 +1503,7 @@ gtk_tree_view_get_property (GObject    *object,
       g_value_set_boolean (value, GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_SHOW_EXPANDERS));
       break;
     case PROP_LEVEL_INDENTATION:
-      g_value_set_int (value, tree_view->priv->level_indentation);
+      gdk_value_set_unit (value, tree_view->priv->level_indentation);
       break;
     case PROP_RUBBER_BANDING:
       g_value_set_boolean (value, tree_view->priv->rubber_banding_enable);
@@ -2005,7 +1999,7 @@ gtk_tree_view_update_size (GtkTreeView *tree_view)
 	}
       else if (column->column_type == GTK_TREE_VIEW_COLUMN_FIXED)
 	{
-	  real_requested_width = column->fixed_width;
+	  real_requested_width = GDK_UNIT_TO_PIXEL (column->fixed_width);
 	}
       else if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_HEADERS_VISIBLE))
 	{
@@ -2017,9 +2011,9 @@ gtk_tree_view_update_size (GtkTreeView *tree_view)
 	}
 
       if (column->min_width != -1)
-	real_requested_width = MAX (real_requested_width, column->min_width);
+	real_requested_width = MAX (real_requested_width, GDK_UNIT_TO_PIXEL (column->min_width));
       if (column->max_width != -1)
-	real_requested_width = MIN (real_requested_width, column->max_width);
+	real_requested_width = MIN (real_requested_width, GDK_UNIT_TO_PIXEL (column->max_width));
 
       tree_view->priv->width += real_requested_width;
     }
@@ -2130,7 +2124,7 @@ gtk_tree_view_get_real_requested_width_from_column
     }
   else if (column->column_type == GTK_TREE_VIEW_COLUMN_FIXED)
     {
-      real_requested_width = column->fixed_width;
+      real_requested_width = GDK_UNIT_TO_PIXEL (column->fixed_width);
     }
   else if (GTK_TREE_VIEW_FLAG_SET (tree_view, GTK_TREE_VIEW_HEADERS_VISIBLE))
     {
@@ -2144,9 +2138,9 @@ gtk_tree_view_get_real_requested_width_from_column
     }
 
   if (column->min_width != -1)
-    real_requested_width = MAX (real_requested_width, column->min_width);
+    real_requested_width = MAX (real_requested_width, GDK_UNIT_TO_PIXEL (column->min_width));
   if (column->max_width != -1)
-    real_requested_width = MIN (real_requested_width, column->max_width);
+    real_requested_width = MIN (real_requested_width, GDK_UNIT_TO_PIXEL (column->max_width));
 
   return real_requested_width;
 }
@@ -2514,6 +2508,8 @@ gtk_tree_view_button_press (GtkWidget      *widget
 			"vertical-separator", &vertical_separator,
 			"horizontal-separator", &horizontal_separator,
 			NULL);
+  MAKE_EVEN (vertical_separator);
+  MAKE_EVEN (horizontal_separator);
 
 
   /* Because grab_focus can cause reentrancy, we delay grab_focus until after
@@ -2624,8 +2620,8 @@ gtk_tree_view_button_press (GtkWidget      *widget
 	  if (gtk_tree_view_is_expander_column (tree_view, column))
 	    {
 	      if (!rtl)
-		cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
-	      cell_area.width -= (depth - 1) * tree_view->priv->level_indentation;
+		cell_area.x += (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
+	      cell_area.width -= (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
 
               if (TREE_VIEW_DRAW_EXPANDERS (tree_view))
 	        {
@@ -3572,7 +3568,7 @@ gtk_tree_view_motion_resize_column (GtkWidget
   new_width = gtk_tree_view_new_column_width (tree_view,
 					      tree_view->priv->drag_pos, &x);
   if (x != tree_view->priv->x_drag &&
-      (new_width != column->fixed_width))
+      (new_width != GDK_UNIT_TO_PIXEL (column->fixed_width)))
     {
       column->use_resized_width = TRUE;
       column->resized_width = new_width;
@@ -4239,6 +4235,8 @@ gtk_tree_view_bin_expose (GtkWidget      *widget,
 			"focus-line-width", &focus_line_width,
 			"row-ending-details", &row_ending_details,
 			NULL);
+  MAKE_EVEN (vertical_separator);
+  MAKE_EVEN (horizontal_separator);
 
   if (tree_view->priv->tree == NULL)
     {
@@ -4638,8 +4636,8 @@ gtk_tree_view_bin_expose (GtkWidget      *widget,
 	  if (gtk_tree_view_is_expander_column (tree_view, column))
 	    {
 	      if (!rtl)
-		cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
-	      cell_area.width -= (depth - 1) * tree_view->priv->level_indentation;
+		cell_area.x += (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
+	      cell_area.width -= (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
 
               if (TREE_VIEW_DRAW_EXPANDERS(tree_view))
 	        {
@@ -5264,12 +5262,12 @@ gtk_tree_view_key_press (GtkWidget   *widget,
                 column->resized_width = MAX (column->button->requisition.width,
                                              column->resized_width);
               else
-                column->resized_width = MAX (column->min_width,
+                column->resized_width = MAX (GDK_UNIT_TO_PIXEL (column->min_width),
                                              column->resized_width);
 
               if (column->max_width != -1)
                 column->resized_width = MIN (column->resized_width,
-                                             column->max_width);
+                                             GDK_UNIT_TO_PIXEL (column->max_width));
 
               column->use_resized_width = TRUE;
 
@@ -5289,7 +5287,7 @@ gtk_tree_view_key_press (GtkWidget   *widget,
 
               if (column->max_width != -1)
                 column->resized_width = MIN (column->resized_width,
-                                             column->max_width);
+                                             GDK_UNIT_TO_PIXEL (column->max_width));
 
               column->use_resized_width = TRUE;
 
@@ -5592,6 +5590,8 @@ validate_row (GtkTreeView *tree_view,
                         "wide-separators",  &wide_separators,
                         "separator-height", &separator_height,
 			NULL);
+  MAKE_EVEN (vertical_separator);
+  MAKE_EVEN (horizontal_separator);
   
   draw_vgrid_lines =
     tree_view->priv->grid_lines == GTK_TREE_VIEW_GRID_LINES_VERTICAL
@@ -5646,7 +5646,7 @@ validate_row (GtkTreeView *tree_view,
 
       if (gtk_tree_view_is_expander_column (tree_view, column))
         {
-	  tmp_width = tmp_width + horizontal_separator + (depth - 1) * tree_view->priv->level_indentation;
+	  tmp_width = tmp_width + horizontal_separator + (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
 
 	  if (TREE_VIEW_DRAW_EXPANDERS (tree_view))
 	    tmp_width += depth * tree_view->priv->expander_size;
@@ -7915,7 +7915,7 @@ gtk_tree_view_style_set (GtkWidget *widget,
   gtk_widget_style_get (widget,
 			"expander-size", &tree_view->priv->expander_size,
 			NULL);
-  tree_view->priv->expander_size += EXPANDER_EXTRA_PADDING;
+  tree_view->priv->expander_size += GDK_UNIT_TO_PIXEL (EXPANDER_EXTRA_PADDING);
 
   for (list = tree_view->priv->columns; list; list = list->next)
     {
@@ -8787,7 +8787,7 @@ gtk_tree_view_discover_dirty_iter (GtkTreeView *tr
 	{
 	  int tmp = 0;
 
-	  tmp = horizontal_separator + width + (depth - 1) * tree_view->priv->level_indentation;
+	  tmp = horizontal_separator + width + (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
 	  if (TREE_VIEW_DRAW_EXPANDERS (tree_view))
 	    tmp += depth * tree_view->priv->expander_size;
 
@@ -9479,7 +9479,8 @@ gtk_tree_view_draw_arrow (GtkTreeView *tree_view,
   gtk_widget_style_get (GTK_WIDGET (tree_view),
 			"vertical-separator", &vertical_separator,
 			NULL);
-  expander_size = tree_view->priv->expander_size - EXPANDER_EXTRA_PADDING;
+  MAKE_EVEN (vertical_separator);
+  expander_size = tree_view->priv->expander_size - GDK_UNIT_TO_PIXEL (EXPANDER_EXTRA_PADDING);
 
   if (! GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT))
     return;
@@ -9763,6 +9764,7 @@ gtk_tree_view_move_cursor_page_up_down (GtkTreeVie
     return;
 
   gtk_widget_style_get (GTK_WIDGET (tree_view), "vertical-separator", &vertical_separator, NULL);
+  MAKE_EVEN (vertical_separator);
   _gtk_tree_view_find_node (tree_view, old_cursor_path,
 			    &cursor_tree, &cursor_node);
 
@@ -10337,7 +10339,7 @@ gtk_tree_view_ensure_interactive_directory (GtkTre
   vbox = gtk_vbox_new (FALSE, 0);
   gtk_widget_show (vbox);
   gtk_container_add (GTK_CONTAINER (frame), vbox);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (3));
 
   /* add entry */
   tree_view->priv->search_entry = gtk_entry_new ();
@@ -10474,10 +10476,10 @@ gtk_tree_view_new_column_width (GtkTreeView *tree_
     width = MAX (column->button->requisition.width,
 		 width);
   else
-    width = MAX (column->min_width,
+    width = MAX (GDK_UNIT_TO_PIXEL (column->min_width),
 		 width);
   if (column->max_width != -1)
-    width = MIN (width, column->max_width);
+    width = MIN (width, GDK_UNIT_TO_PIXEL (column->max_width));
 
   *x = rtl ? (column->button->allocation.x + column->button->allocation.width - width) : (column->button->allocation.x + width);
  
@@ -12878,6 +12880,8 @@ gtk_tree_view_get_cell_area (GtkTreeView        *t
 			"vertical-separator", &vertical_separator,
 			"horizontal-separator", &horizontal_separator,
 			NULL);
+  MAKE_EVEN (vertical_separator);
+  MAKE_EVEN (horizontal_separator);
 
   rect->x = 0;
   rect->y = 0;
@@ -12910,8 +12914,8 @@ gtk_tree_view_get_cell_area (GtkTreeView        *t
 	  rtl = gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL;
 
 	  if (!rtl)
-	    rect->x += (depth - 1) * tree_view->priv->level_indentation;
-	  rect->width -= (depth - 1) * tree_view->priv->level_indentation;
+	    rect->x += (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
+	  rect->width -= (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
 
 	  if (TREE_VIEW_DRAW_EXPANDERS (tree_view))
 	    {
@@ -13775,6 +13779,7 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView  *
       gtk_widget_style_get (widget,
 			    "vertical-separator", &vertical_separator,
 			    NULL);
+      MAKE_EVEN (vertical_separator);
 
       cell_area = background_area;
 
@@ -13784,8 +13789,8 @@ gtk_tree_view_create_row_drag_icon (GtkTreeView  *
       if (gtk_tree_view_is_expander_column (tree_view, column))
         {
 	  if (!rtl)
-	    cell_area.x += (depth - 1) * tree_view->priv->level_indentation;
-	  cell_area.width -= (depth - 1) * tree_view->priv->level_indentation;
+	    cell_area.x += (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
+	  cell_area.width -= (depth - 1) * GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
 
           if (TREE_VIEW_DRAW_EXPANDERS(tree_view))
 	    {
@@ -15335,7 +15340,7 @@ gtk_tree_view_get_show_expanders (GtkTreeView *tre
  */
 void
 gtk_tree_view_set_level_indentation (GtkTreeView *tree_view,
-				     gint         indentation)
+				     GdkUnit      indentation)
 {
   tree_view->priv->level_indentation = indentation;
 
@@ -15359,6 +15364,25 @@ gtk_tree_view_get_level_indentation (GtkTreeView *
 {
   g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), 0);
 
+  return GDK_UNIT_TO_PIXEL (tree_view->priv->level_indentation);
+}
+
+/**
+ * gtk_tree_view_get_level_indentation_unit:
+ * @tree_view: a #GtkTreeView.
+ *
+ * Like gtk_tree_view_get_level_indentation() but preserves the unit.
+ *
+ * Return value: the amount of extra indentation for child levels in
+ * @tree_view.  A return value of 0 means that this feature is disabled.
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_tree_view_get_level_indentation_unit (GtkTreeView *tree_view)
+{
+  g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), 0);
+
   return tree_view->priv->level_indentation;
 }
 
Index: gtk/gtktreeview.h
===================================================================
--- gtk/gtktreeview.h	(revision 21028)
+++ gtk/gtktreeview.h	(working copy)
@@ -404,6 +404,7 @@ gboolean                    gtk_tree_view_get_show
 void                        gtk_tree_view_set_level_indentation  (GtkTreeView                *tree_view,
 								  gint                        indentation);
 gint                        gtk_tree_view_get_level_indentation  (GtkTreeView                *tree_view);
+GdkUnit                     gtk_tree_view_get_level_indentation_unit (GtkTreeView            *tree_view);
 
 /* Convenience functions for setting tooltips */
 void          gtk_tree_view_set_tooltip_row    (GtkTreeView       *tree_view,
Index: gtk/gtkiconview.c
===================================================================
--- gtk/gtkiconview.c	(revision 21028)
+++ gtk/gtkiconview.c	(working copy)
@@ -45,7 +45,7 @@
 
 #undef DEBUG_ICON_VIEW
 
-#define SCROLL_EDGE_SIZE 15
+#define SCROLL_EDGE_SIZE GDK_UNIT_ONE_TWELFTH_EM(15)
 
 #define GTK_ICON_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ICON_VIEW, GtkIconViewPrivate))
 
@@ -646,11 +646,11 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
    */
   g_object_class_install_property (gobject_class,
 				   PROP_ITEM_WIDTH,
-				   g_param_spec_int ("item-width",
-						     P_("Width for each item"),
-						     P_("The width used for each item"),
-						     -1, G_MAXINT, -1,
-						     GTK_PARAM_READWRITE));  
+				   gdk_param_spec_unit ("item-width",
+                                                        P_("Width for each item"),
+                                                        P_("The width used for each item"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));  
 
   /**
    * GtkIconView:spacing:
@@ -662,11 +662,11 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
    */
   g_object_class_install_property (gobject_class,
                                    PROP_SPACING,
-                                   g_param_spec_int ("spacing",
-						     P_("Spacing"),
-						     P_("Space which is inserted between cells of an item"),
-						     0, G_MAXINT, 0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("spacing",
+                                                        P_("Spacing"),
+                                                        P_("Space which is inserted between cells of an item"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   /**
    * GtkIconView:row-spacing:
@@ -678,11 +678,11 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
    */
   g_object_class_install_property (gobject_class,
                                    PROP_ROW_SPACING,
-                                   g_param_spec_int ("row-spacing",
-						     P_("Row Spacing"),
-						     P_("Space which is inserted between grid rows"),
-						     0, G_MAXINT, 6,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("row-spacing",
+                                                        P_("Row Spacing"),
+                                                        P_("Space which is inserted between grid rows"),
+                                                        GDK_UNIT_ONE_TWELFTH_EM (6),
+                                                        GTK_PARAM_READWRITE));
 
   /**
    * GtkIconView:column-spacing:
@@ -694,11 +694,11 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
    */
   g_object_class_install_property (gobject_class,
                                    PROP_COLUMN_SPACING,
-                                   g_param_spec_int ("column-spacing",
-						     P_("Column Spacing"),
-						     P_("Space which is inserted between grid columns"),
-						     0, G_MAXINT, 6,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("column-spacing",
+                                                        P_("Column Spacing"),
+                                                        P_("Space which is inserted between grid columns"),
+                                                        GDK_UNIT_ONE_TWELFTH_EM (6),
+                                                        GTK_PARAM_READWRITE));
 
   /**
    * GtkIconView:margin:
@@ -710,11 +710,11 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
    */
   g_object_class_install_property (gobject_class,
                                    PROP_MARGIN,
-                                   g_param_spec_int ("margin",
-						     P_("Margin"),
-						     P_("Space which is inserted at the edges of the icon view"),
-						     0, G_MAXINT, 6,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("margin",
+                                                        P_("Margin"),
+                                                        P_("Space which is inserted at the edges of the icon view"),
+                                                        GDK_UNIT_ONE_TWELFTH_EM (6),
+                                                        GTK_PARAM_READWRITE));
 
 
   /**
@@ -985,9 +985,9 @@ gtk_icon_view_init (GtkIconView *icon_view)
   icon_view->priv->columns = -1;
   icon_view->priv->item_width = -1;
   icon_view->priv->spacing = 0;
-  icon_view->priv->row_spacing = 6;
-  icon_view->priv->column_spacing = 6;
-  icon_view->priv->margin = 6;
+  icon_view->priv->row_spacing = GDK_UNIT_ONE_TWELFTH_EM (6);
+  icon_view->priv->column_spacing = GDK_UNIT_ONE_TWELFTH_EM (6);
+  icon_view->priv->margin = GDK_UNIT_ONE_TWELFTH_EM (6);
 }
 
 static void
@@ -1077,19 +1077,19 @@ gtk_icon_view_set_property (GObject      *object,
       gtk_icon_view_set_columns (icon_view, g_value_get_int (value));
       break;
     case PROP_ITEM_WIDTH:
-      gtk_icon_view_set_item_width (icon_view, g_value_get_int (value));
+      gtk_icon_view_set_item_width (icon_view, gdk_value_get_unit (value));
       break;
     case PROP_SPACING:
-      gtk_icon_view_set_spacing (icon_view, g_value_get_int (value));
+      gtk_icon_view_set_spacing (icon_view, gdk_value_get_unit (value));
       break;
     case PROP_ROW_SPACING:
-      gtk_icon_view_set_row_spacing (icon_view, g_value_get_int (value));
+      gtk_icon_view_set_row_spacing (icon_view, gdk_value_get_unit (value));
       break;
     case PROP_COLUMN_SPACING:
-      gtk_icon_view_set_column_spacing (icon_view, g_value_get_int (value));
+      gtk_icon_view_set_column_spacing (icon_view, gdk_value_get_unit (value));
       break;
     case PROP_MARGIN:
-      gtk_icon_view_set_margin (icon_view, g_value_get_int (value));
+      gtk_icon_view_set_margin (icon_view, gdk_value_get_unit (value));
       break;
     case PROP_REORDERABLE:
       gtk_icon_view_set_reorderable (icon_view, g_value_get_boolean (value));
@@ -1139,19 +1139,19 @@ gtk_icon_view_get_property (GObject      *object,
       g_value_set_int (value, icon_view->priv->columns);
       break;
     case PROP_ITEM_WIDTH:
-      g_value_set_int (value, icon_view->priv->item_width);
+      gdk_value_set_unit (value, icon_view->priv->item_width);
       break;
     case PROP_SPACING:
-      g_value_set_int (value, icon_view->priv->spacing);
+      gdk_value_set_unit (value, icon_view->priv->spacing);
       break;
     case PROP_ROW_SPACING:
-      g_value_set_int (value, icon_view->priv->row_spacing);
+      gdk_value_set_unit (value, icon_view->priv->row_spacing);
       break;
     case PROP_COLUMN_SPACING:
-      g_value_set_int (value, icon_view->priv->column_spacing);
+      gdk_value_set_unit (value, icon_view->priv->column_spacing);
       break;
     case PROP_MARGIN:
-      g_value_set_int (value, icon_view->priv->margin);
+      gdk_value_set_unit (value, icon_view->priv->margin);
       break;
     case PROP_REORDERABLE:
       g_value_set_boolean (value, icon_view->priv->reorderable);
@@ -2537,8 +2537,8 @@ gtk_icon_view_layout_single_row (GtkIconView *icon
 			"focus-line-width", &focus_width,
 			NULL);
 
-  x += icon_view->priv->margin + focus_width;
-  current_width += 2 * (icon_view->priv->margin + focus_width);
+  x += GDK_UNIT_TO_PIXEL (icon_view->priv->margin) + focus_width;
+  current_width += 2 * (GDK_UNIT_TO_PIXEL (icon_view->priv->margin) + focus_width);
 
   items = first_item;
   while (items)
@@ -2546,9 +2546,9 @@ gtk_icon_view_layout_single_row (GtkIconView *icon
       GtkIconViewItem *item = items->data;
 
       gtk_icon_view_calculate_item_size (icon_view, item);
-      colspan = 1 + (item->width - 1) / (item_width + icon_view->priv->column_spacing);
+      colspan = 1 + (item->width - 1) / (item_width + GDK_UNIT_TO_PIXEL (icon_view->priv->column_spacing));
 
-      item->width = colspan * item_width + (colspan - 1) * icon_view->priv->column_spacing;
+      item->width = colspan * item_width + (colspan - 1) * GDK_UNIT_TO_PIXEL (icon_view->priv->column_spacing);
 
       current_width += item->width;
 
@@ -2559,12 +2559,12 @@ gtk_icon_view_layout_single_row (GtkIconView *icon
 	    break;
 	}
 
-      current_width += icon_view->priv->column_spacing + 2 * focus_width;
+      current_width += GDK_UNIT_TO_PIXEL (icon_view->priv->column_spacing) + 2 * focus_width;
 
       item->y = *y + focus_width;
       item->x = rtl ? GTK_WIDGET (icon_view)->allocation.width - item->width - x : x;
 
-      x = current_width - (icon_view->priv->margin + focus_width); 
+      x = current_width - (GDK_UNIT_TO_PIXEL (icon_view->priv->margin) + focus_width); 
 
       for (i = 0; i < icon_view->priv->n_cells; i++)
 	max_height[i] = MAX (max_height[i], item->box[i].height);
@@ -2589,8 +2589,8 @@ gtk_icon_view_layout_single_row (GtkIconView *icon
       gtk_icon_view_calculate_item_size2 (icon_view, item, max_height);
 
       /* We may want to readjust the new y coordinate. */
-      if (item->y + item->height + focus_width + icon_view->priv->row_spacing > *y)
-	*y = item->y + item->height + focus_width + icon_view->priv->row_spacing;
+      if (item->y + item->height + focus_width + GDK_UNIT_TO_PIXEL (icon_view->priv->row_spacing) > *y)
+	*y = item->y + item->height + focus_width + GDK_UNIT_TO_PIXEL (icon_view->priv->row_spacing);
 
       if (rtl)
 	item->col = col - 1 - item->col;
@@ -2645,7 +2645,7 @@ gtk_icon_view_layout (GtkIconView *icon_view)
 
   widget = GTK_WIDGET (icon_view);
 
-  item_width = icon_view->priv->item_width;
+  item_width = GDK_UNIT_TO_PIXEL (icon_view->priv->item_width);
 
   if (item_width < 0)
     {
@@ -2659,7 +2659,7 @@ gtk_icon_view_layout (GtkIconView *icon_view)
 
 
   icons = icon_view->priv->items;
-  y += icon_view->priv->margin;
+  y += GDK_UNIT_TO_PIXEL (icon_view->priv->margin);
   row = 0;
 
   if (icons)
@@ -2680,7 +2680,7 @@ gtk_icon_view_layout (GtkIconView *icon_view)
   if (maximum_width != icon_view->priv->width)
     icon_view->priv->width = maximum_width;
 
-  y += icon_view->priv->margin;
+  y += GDK_UNIT_TO_PIXEL (icon_view->priv->margin);
   
   if (y != icon_view->priv->height)
     icon_view->priv->height = y;
@@ -2781,22 +2781,22 @@ adjust_wrap_width (GtkIconView     *icon_view,
 				  NULL);
 	  
 
-      if (icon_view->priv->item_width > 0)
-	item_width = icon_view->priv->item_width;
+      if (GDK_UNIT_TO_PIXEL (icon_view->priv->item_width) > 0)
+	item_width = GDK_UNIT_TO_PIXEL (icon_view->priv->item_width);
       else
 	item_width = item->width;
 
       if (item->width == -1)
         {
 	  if (item_width > 0)
-	    wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
+	    wrap_width = item_width - pixbuf_width - GDK_UNIT_TO_PIXEL (icon_view->priv->spacing);
 	  else
 	    wrap_width = MAX (2 * pixbuf_width, 50);
 	}
       else if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
 	wrap_width = item_width;
       else
-	wrap_width = item_width - pixbuf_width - icon_view->priv->spacing;
+	wrap_width = item_width - pixbuf_width - GDK_UNIT_TO_PIXEL (icon_view->priv->spacing);
 
       g_object_set (text_info->cell, "wrap-width", wrap_width, NULL);
       g_object_set (text_info->cell, "width", wrap_width, NULL);
@@ -2828,7 +2828,7 @@ gtk_icon_view_calculate_item_size (GtkIconView
 
   gtk_icon_view_set_cell_data (icon_view, item);
 
-  spacing = icon_view->priv->spacing;
+  spacing = GDK_UNIT_TO_PIXEL (icon_view->priv->spacing);
 
   item->width = 0;
   item->height = 0;
@@ -2873,7 +2873,7 @@ gtk_icon_view_calculate_item_size2 (GtkIconView
 
   gtk_icon_view_set_cell_data (icon_view, item);
 
-  spacing = icon_view->priv->spacing;
+  spacing = GDK_UNIT_TO_PIXEL (icon_view->priv->spacing);
 
   item->height = 0;
   for (i = 0; i < icon_view->priv->n_cells; i++)
@@ -3303,8 +3303,8 @@ gtk_icon_view_get_item_at_coords (GtkIconView
     {
       GtkIconViewItem *item = items->data;
 
-      if (x >= item->x - icon_view->priv->column_spacing/2 && x <= item->x + item->width + icon_view->priv->column_spacing/2 &&
-	  y >= item->y - icon_view->priv->row_spacing/2 && y <= item->y + item->height + icon_view->priv->row_spacing/2)
+      if (x >= item->x - GDK_UNIT_TO_PIXEL (icon_view->priv->column_spacing)/2 && x <= item->x + item->width + GDK_UNIT_TO_PIXEL (icon_view->priv->column_spacing)/2 &&
+	  y >= item->y - GDK_UNIT_TO_PIXEL (icon_view->priv->row_spacing)/2 && y <= item->y + item->height + GDK_UNIT_TO_PIXEL (icon_view->priv->row_spacing)/2)
 	{
 	  if (only_in_cell || cell_at_pos)
 	    {
@@ -5868,7 +5868,7 @@ gtk_icon_view_get_columns (GtkIconView *icon_view)
  */
 void 
 gtk_icon_view_set_item_width (GtkIconView *icon_view,
-			      gint         item_width)
+			      GdkUnit      item_width)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
   
@@ -5901,6 +5901,24 @@ gtk_icon_view_get_item_width (GtkIconView *icon_vi
 {
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
 
+  return GDK_UNIT_TO_PIXEL (icon_view->priv->item_width);
+}
+
+/**
+ * gtk_icon_view_get_item_width_unit:
+ * @icon_view: a #GtkIconView
+ * 
+ * Like gtk_icon_view_get_item_width() but preserves the unit.
+ * 
+ * Return value: the width_unit of a single item, or -1
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_icon_view_get_item_width_unit (GtkIconView *icon_view)
+{
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+
   return icon_view->priv->item_width;
 }
 
@@ -5918,7 +5936,7 @@ gtk_icon_view_get_item_width (GtkIconView *icon_vi
  */
 void 
 gtk_icon_view_set_spacing (GtkIconView *icon_view,
-			   gint         spacing)
+			   GdkUnit      spacing)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
   
@@ -5949,6 +5967,24 @@ gtk_icon_view_get_spacing (GtkIconView *icon_view)
 {
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
 
+  return GDK_UNIT_TO_PIXEL (icon_view->priv->spacing);
+}
+
+/**
+ * gtk_icon_view_get_spacing_unit:
+ * @icon_view: a #GtkIconView
+ * 
+ * Like gtk_icon_view_get_spacing() but preserves the unit.
+ * 
+ * Return value: the space between cells 
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_icon_view_get_spacing_unit (GtkIconView *icon_view)
+{
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+
   return icon_view->priv->spacing;
 }
 
@@ -5964,7 +6000,7 @@ gtk_icon_view_get_spacing (GtkIconView *icon_view)
  */
 void 
 gtk_icon_view_set_row_spacing (GtkIconView *icon_view,
-			       gint         row_spacing)
+			       GdkUnit      row_spacing)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
   
@@ -5995,6 +6031,24 @@ gtk_icon_view_get_row_spacing (GtkIconView *icon_v
 {
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
 
+  return GDK_UNIT_TO_PIXEL (icon_view->priv->row_spacing);
+}
+
+/**
+ * gtk_icon_view_get_row_spacing_unit:
+ * @icon_view: a #GtkIconView
+ * 
+ * Like gtk_icon_view_get_row_spacing() but preserves the unit.
+ * 
+ * Return value: the space between rows
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_icon_view_get_row_spacing_unit (GtkIconView *icon_view)
+{
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+
   return icon_view->priv->row_spacing;
 }
 
@@ -6010,7 +6064,7 @@ gtk_icon_view_get_row_spacing (GtkIconView *icon_v
  */
 void 
 gtk_icon_view_set_column_spacing (GtkIconView *icon_view,
-				  gint         column_spacing)
+				  GdkUnit      column_spacing)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
   
@@ -6041,6 +6095,24 @@ gtk_icon_view_get_column_spacing (GtkIconView *ico
 {
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
 
+  return GDK_UNIT_TO_PIXEL (icon_view->priv->column_spacing);
+}
+
+/**
+ * gtk_icon_view_get_column_spacing_unit:
+ * @icon_view: a #GtkIconView
+ * 
+ * Like gtk_icon_view_get_column_spacing() but preserves the unit.
+ * 
+ * Return value: the space between columns
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_icon_view_get_column_spacing_unit (GtkIconView *icon_view)
+{
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+
   return icon_view->priv->column_spacing;
 }
 
@@ -6057,7 +6129,7 @@ gtk_icon_view_get_column_spacing (GtkIconView *ico
  */
 void 
 gtk_icon_view_set_margin (GtkIconView *icon_view,
-			  gint         margin)
+			  GdkUnit      margin)
 {
   g_return_if_fail (GTK_IS_ICON_VIEW (icon_view));
   
@@ -6088,6 +6160,24 @@ gtk_icon_view_get_margin (GtkIconView *icon_view)
 {
   g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
 
+  return GDK_UNIT_TO_PIXEL (icon_view->priv->margin);
+}
+
+/**
+ * gtk_icon_view_get_margin_unit:
+ * @icon_view: a #GtkIconView
+ * 
+ * Like gtk_icon_view_get_margin() but preserves the unit.
+ * 
+ * Return value: the space at the borders 
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_icon_view_get_margin_unit (GtkIconView *icon_view)
+{
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+
   return icon_view->priv->margin;
 }
 
@@ -6286,13 +6376,13 @@ gtk_icon_view_autoscroll (GtkIconView *icon_view)
   gdk_window_get_geometry (GTK_WIDGET (icon_view)->window, &x, &y, &width, &height, NULL);
 
   /* see if we are near the edge. */
-  voffset = py - (y + 2 * SCROLL_EDGE_SIZE);
+  voffset = py - (y + 2 * GDK_UNIT_TO_PIXEL (SCROLL_EDGE_SIZE));
   if (voffset > 0)
-    voffset = MAX (py - (y + height - 2 * SCROLL_EDGE_SIZE), 0);
+    voffset = MAX (py - (y + height - 2 * GDK_UNIT_TO_PIXEL (SCROLL_EDGE_SIZE)), 0);
 
-  hoffset = px - (x + 2 * SCROLL_EDGE_SIZE);
+  hoffset = px - (x + 2 * GDK_UNIT_TO_PIXEL (SCROLL_EDGE_SIZE));
   if (hoffset > 0)
-    hoffset = MAX (px - (x + width - 2 * SCROLL_EDGE_SIZE), 0);
+    hoffset = MAX (px - (x + width - 2 * GDK_UNIT_TO_PIXEL (SCROLL_EDGE_SIZE)), 0);
 
   if (voffset != 0)
     gtk_adjustment_set_value (icon_view->priv->vadjustment,
@@ -8151,7 +8241,7 @@ gtk_icon_view_item_accessible_text_get_character_e
   atk_component_get_position (ATK_COMPONENT (text), x, y, coord_type);
   *x += item->item->layout_x - item->item->x + char_rect.x / PANGO_SCALE;
   /* Look at gtk_icon_view_paint_item() to see where the text is. */
-  *x -=  ((item->item->width - item->item->layout_width) / 2) + (MAX (item->item->pixbuf_width, icon_view->priv->item_width) - item->item->width) / 2,
+  *x -=  ((item->item->width - item->item->layout_width) / 2) + (MAX (item->item->pixbuf_width, GDK_UNIT_TO_PIXEL (icon_view->priv->item_width)) - GDK_UNIT_TO_PIXEL (item->item->width)) / 2,
   *y += item->item->layout_y - item->item->y + char_rect.y / PANGO_SCALE;
   *width = char_rect.width / PANGO_SCALE;
   *height = char_rect.height / PANGO_SCALE;
@@ -8187,7 +8277,7 @@ gtk_icon_view_item_accessible_text_get_offset_at_p
   gtk_icon_view_update_item_text (icon_view, item->item);
   atk_component_get_position (ATK_COMPONENT (text), &l_x, &l_y, coord_type);
   x -= l_x + item->item->layout_x - item->item->x;
-  x +=  ((item->item->width - item->item->layout_width) / 2) + (MAX (item->item->pixbuf_width, icon_view->priv->item_width) - item->item->width) / 2,
+  x +=  ((item->item->width - item->item->layout_width) / 2) + (MAX (item->item->pixbuf_width, GDK_UNIT_TO_PIXEL (icon_view->priv->item_width)) - GDK_UNIT_TO_PIXEL (item->item->width)) / 2,
   y -= l_y + item->item->layout_y - item->item->y;
   item_text = pango_layout_get_text (icon_view->priv->layout);
   if (!pango_layout_xy_to_index (icon_view->priv->layout, 
Index: gtk/gtk.symbols
===================================================================
--- gtk/gtk.symbols	(revision 21028)
+++ gtk/gtk.symbols	(working copy)
@@ -220,6 +220,7 @@ gtk_adjustment_value_changed
 #if IN_HEADER(__GTK_ALIGNMENT_H__)
 #if IN_FILE(__GTK_ALIGNMENT_C__)
 gtk_alignment_get_padding
+gtk_alignment_get_padding_unit
 gtk_alignment_get_type G_GNUC_CONST
 gtk_alignment_new
 gtk_alignment_set
@@ -421,6 +422,7 @@ gtk_bin_get_type G_GNUC_CONST
 #if IN_FILE(__GTK_BOX_C__)
 gtk_box_get_homogeneous
 gtk_box_get_spacing
+gtk_box_get_spacing_unit
 gtk_box_get_type G_GNUC_CONST
 gtk_box_pack_end
 gtk_box_pack_start
@@ -429,6 +431,7 @@ gtk_box_pack_end_defaults
 gtk_box_pack_start_defaults
 #endif
 gtk_box_query_child_packing
+gtk_box_query_child_packing_unit
 gtk_box_reorder_child
 gtk_box_set_child_packing
 gtk_box_set_homogeneous
@@ -576,7 +579,9 @@ gtk_cell_renderer_activate
 gtk_cell_renderer_editing_canceled
 #endif
 gtk_cell_renderer_get_fixed_size
+gtk_cell_renderer_get_fixed_size_unit
 gtk_cell_renderer_get_size
+gtk_cell_renderer_get_size_unit
 gtk_cell_renderer_get_type G_GNUC_CONST
 gtk_cell_renderer_render
 gtk_cell_renderer_set_fixed_size
@@ -938,6 +943,7 @@ gtk_container_foreach
 gtk_container_foreach_full
 #endif
 gtk_container_get_border_width
+gtk_container_get_border_width_unit
 gtk_container_get_children
 gtk_container_get_focus_chain
 gtk_container_get_focus_child
@@ -1345,6 +1351,7 @@ gtk_expander_get_expanded
 gtk_expander_get_label
 gtk_expander_get_label_widget
 gtk_expander_get_spacing
+gtk_expander_get_spacing_unit
 gtk_expander_get_type G_GNUC_CONST
 gtk_expander_get_use_markup
 gtk_expander_get_use_underline
@@ -1701,6 +1708,7 @@ gtk_hseparator_new
 #if IN_FILE(__GTK_HSV_C__)
 gtk_hsv_get_color
 gtk_hsv_get_metrics
+gtk_hsv_get_metrics_unit
 gtk_hsv_get_type G_GNUC_CONST
 gtk_hsv_is_adjusting
 gtk_hsv_new
@@ -1723,7 +1731,9 @@ gtk_icon_factory_remove_default
 gtk_icon_size_from_name
 gtk_icon_size_get_name
 gtk_icon_size_lookup
+gtk_icon_size_lookup_unit
 gtk_icon_size_lookup_for_settings
+gtk_icon_size_lookup_for_settings_unit
 gtk_icon_size_register
 gtk_icon_size_register_alias
 gtk_icon_set_add_source
@@ -1823,10 +1833,13 @@ gtk_icon_theme_set_search_path_utf8
 #if IN_HEADER(__GTK_ICON_VIEW_H__)
 #if IN_FILE(__GTK_ICON_VIEW_C__)
 gtk_icon_view_get_column_spacing
+gtk_icon_view_get_column_spacing_unit
 gtk_icon_view_get_columns
 gtk_icon_view_get_cursor
 gtk_icon_view_get_item_width
+gtk_icon_view_get_item_width_unit
 gtk_icon_view_get_margin
+gtk_icon_view_get_margin_unit
 gtk_icon_view_get_markup_column
 gtk_icon_view_get_model
 gtk_icon_view_get_orientation
@@ -1835,9 +1848,11 @@ gtk_icon_view_get_item_at_pos
 gtk_icon_view_convert_widget_to_bin_window_coords
 gtk_icon_view_get_pixbuf_column
 gtk_icon_view_get_row_spacing
+gtk_icon_view_get_row_spacing_unit
 gtk_icon_view_get_selected_items
 gtk_icon_view_get_selection_mode
 gtk_icon_view_get_spacing
+gtk_icon_view_get_spacing_unit
 gtk_icon_view_get_text_column
 gtk_icon_view_get_type G_GNUC_CONST
 gtk_icon_view_get_visible_range
@@ -1895,6 +1910,7 @@ gtk_image_get_icon_set
 gtk_image_get_image
 gtk_image_get_pixbuf
 gtk_image_get_pixel_size
+gtk_image_get_pixel_size_unit
 gtk_image_get_pixmap
 gtk_image_get_stock
 gtk_image_get_gicon
@@ -2388,6 +2404,7 @@ gtk_message_dialog_get_image
 #if IN_FILE(__GTK_MISC_C__)
 gtk_misc_get_alignment
 gtk_misc_get_padding
+gtk_misc_get_padding_unit
 gtk_misc_get_type G_GNUC_CONST
 gtk_misc_set_alignment
 gtk_misc_set_padding
@@ -2492,6 +2509,8 @@ gtk_object_sink
 #endif
 gtk_object_destroy
 gtk_object_get_type G_GNUC_CONST
+gtk_object_get_unit
+gtk_object_get_unit_valist
 #endif
 #endif
 
@@ -3585,10 +3604,14 @@ gtk_stock_set_translate_func
 gtk_table_attach
 gtk_table_attach_defaults
 gtk_table_get_col_spacing
+gtk_table_get_col_spacing_unit
 gtk_table_get_default_col_spacing
+gtk_table_get_default_col_spacing_unit
 gtk_table_get_default_row_spacing
+gtk_table_get_default_row_spacing_unit
 gtk_table_get_homogeneous
 gtk_table_get_row_spacing
+gtk_table_get_row_spacing_unit
 gtk_table_get_type G_GNUC_CONST
 gtk_table_new
 gtk_table_resize
@@ -3936,18 +3959,24 @@ gtk_text_view_get_cursor_visible
 gtk_text_view_get_default_attributes
 gtk_text_view_get_editable
 gtk_text_view_get_indent
+gtk_text_view_get_indent_unit
 gtk_text_view_get_iter_at_location
 gtk_text_view_get_iter_at_position
 gtk_text_view_get_iter_location
 gtk_text_view_get_justification
 gtk_text_view_get_left_margin
+gtk_text_view_get_left_margin_unit
 gtk_text_view_get_line_at_y
 gtk_text_view_get_line_yrange
 gtk_text_view_get_overwrite
 gtk_text_view_get_pixels_above_lines
+gtk_text_view_get_pixels_above_lines_unit
 gtk_text_view_get_pixels_below_lines
+gtk_text_view_get_pixels_below_lines_unit
 gtk_text_view_get_pixels_inside_wrap
+gtk_text_view_get_pixels_inside_wrap_unit
 gtk_text_view_get_right_margin
+gtk_text_view_get_right_margin_unit
 gtk_text_view_get_tabs
 gtk_text_view_get_type G_GNUC_CONST
 gtk_text_view_get_visible_rect
@@ -4416,8 +4445,11 @@ gtk_tree_view_column_get_cell_renderers
 gtk_tree_view_column_get_clickable
 gtk_tree_view_column_get_expand
 gtk_tree_view_column_get_fixed_width
+gtk_tree_view_column_get_fixed_width_unit
 gtk_tree_view_column_get_max_width
+gtk_tree_view_column_get_max_width_unit
 gtk_tree_view_column_get_min_width
+gtk_tree_view_column_get_min_width_unit
 gtk_tree_view_column_get_reorderable
 gtk_tree_view_column_get_resizable
 gtk_tree_view_column_get_sizing
@@ -4425,6 +4457,7 @@ gtk_tree_view_column_get_sort_column_id
 gtk_tree_view_column_get_sort_indicator
 gtk_tree_view_column_get_sort_order
 gtk_tree_view_column_get_spacing
+gtk_tree_view_column_get_spacing_unit
 gtk_tree_view_column_get_title
 gtk_tree_view_column_get_tree_view
 gtk_tree_view_column_get_type G_GNUC_CONST
@@ -4493,6 +4526,7 @@ gtk_tree_view_get_headers_visible
 gtk_tree_view_get_hover_expand
 gtk_tree_view_get_hover_selection
 gtk_tree_view_get_level_indentation
+gtk_tree_view_get_level_indentation_unit
 gtk_tree_view_get_model
 gtk_tree_view_get_path_at_pos
 gtk_tree_view_get_reorderable
@@ -4737,6 +4771,7 @@ gtk_widget_get_root_window
 gtk_widget_get_screen
 gtk_widget_get_settings
 gtk_widget_get_size_request
+gtk_widget_get_size_request_unit
 gtk_widget_get_snapshot
 gtk_widget_get_style
 gtk_widget_get_tooltip_markup
@@ -4830,6 +4865,9 @@ gtk_widget_size_request
 gtk_widget_style_get G_GNUC_NULL_TERMINATED
 gtk_widget_style_get_property
 gtk_widget_style_get_valist
+gtk_widget_style_get_unit G_GNUC_NULL_TERMINATED
+gtk_widget_style_get_property_unit
+gtk_widget_style_get_unit_valist
 gtk_widget_thaw_child_notify
 gtk_widget_translate_coordinates
 gtk_widget_trigger_tooltip_query
Index: gtk/gtkiconview.h
===================================================================
--- gtk/gtkiconview.h	(revision 21028)
+++ gtk/gtkiconview.h	(working copy)
@@ -111,20 +111,25 @@ void           gtk_icon_view_set_columns       (Gt
 		 			        gint            columns);
 gint           gtk_icon_view_get_columns       (GtkIconView    *icon_view);
 void           gtk_icon_view_set_item_width    (GtkIconView    *icon_view,
-					        gint            item_width);
+					        GdkUnit         item_width);
 gint           gtk_icon_view_get_item_width    (GtkIconView    *icon_view);
+GdkUnit        gtk_icon_view_get_item_width_unit (GtkIconView    *icon_view);
 void           gtk_icon_view_set_spacing       (GtkIconView    *icon_view, 
-		 			        gint            spacing);
+		 			        GdkUnit         spacing);
 gint           gtk_icon_view_get_spacing       (GtkIconView    *icon_view);
+GdkUnit        gtk_icon_view_get_spacing_unit  (GtkIconView    *icon_view);
 void           gtk_icon_view_set_row_spacing   (GtkIconView    *icon_view, 
-					        gint            row_spacing);
+					        GdkUnit         row_spacing);
 gint           gtk_icon_view_get_row_spacing   (GtkIconView    *icon_view);
+GdkUnit        gtk_icon_view_get_row_spacing_unit (GtkIconView    *icon_view);
 void           gtk_icon_view_set_column_spacing (GtkIconView    *icon_view, 
-					        gint            column_spacing);
+                                                 GdkUnit         column_spacing);
 gint           gtk_icon_view_get_column_spacing (GtkIconView    *icon_view);
+GdkUnit        gtk_icon_view_get_column_spacing_unit (GtkIconView    *icon_view);
 void           gtk_icon_view_set_margin        (GtkIconView    *icon_view, 
-					        gint            margin);
+					        GdkUnit         margin);
 gint           gtk_icon_view_get_margin        (GtkIconView    *icon_view);
+GdkUnit        gtk_icon_view_get_margin_unit   (GtkIconView    *icon_view);
 
 
 GtkTreePath *  gtk_icon_view_get_path_at_pos   (GtkIconView     *icon_view,
Index: gtk/gtkwindow.c
===================================================================
--- gtk/gtkwindow.c	(revision 21028)
+++ gtk/gtkwindow.c	(working copy)
@@ -144,8 +144,8 @@ struct _GtkWindowGeometryInfo
   /* Default size - used only the FIRST time we map a window,
    * only if > 0.
    */
-  gint           default_width; 
-  gint           default_height;
+  GdkUnit        default_width; 
+  GdkUnit        default_height;
   /* whether to use initial_x, initial_y */
   guint          initial_pos_set : 1;
   /* CENTER_ALWAYS or other position constraint changed since
@@ -280,9 +280,9 @@ static void     gtk_window_compute_configure_reque
 
 static void     gtk_window_set_default_size_internal (GtkWindow    *window,
                                                       gboolean      change_width,
-                                                      gint          width,
+                                                      GdkUnit       width,
                                                       gboolean      change_height,
-                                                      gint          height,
+                                                      GdkUnit       height,
 						      gboolean      is_geometry);
 
 static void     update_themed_icon                    (GtkIconTheme *theme,
@@ -297,6 +297,9 @@ static GtkKeyHash *gtk_window_get_key_hash
 static void        gtk_window_free_key_hash       (GtkWindow   *window);
 static void	   gtk_window_on_composited_changed (GdkScreen *screen,
 						     GtkWindow *window);
+static void gtk_window_on_unit_changed (GdkScreen *screen,
+                                        gdouble    em_factor,
+                                        GtkWindow *window);
 
 static GSList      *toplevel_list = NULL;
 static guint        window_signals[LAST_SIGNAL] = { 0 };
@@ -544,23 +547,19 @@ gtk_window_class_init (GtkWindowClass *klass)
  
   g_object_class_install_property (gobject_class,
                                    PROP_DEFAULT_WIDTH,
-                                   g_param_spec_int ("default-width",
-						     P_("Default Width"),
-						     P_("The default width of the window, used when initially showing the window"),
-						     -1,
-						     G_MAXINT,
-						     -1,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("default-width",
+                                                        P_("Default Width"),
+                                                        P_("The default width of the window, used when initially showing the window"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
   
   g_object_class_install_property (gobject_class,
                                    PROP_DEFAULT_HEIGHT,
-                                   g_param_spec_int ("default-height",
-						     P_("Default Height"),
-						     P_("The default height of the window, used when initially showing the window"),
-						     -1,
-						     G_MAXINT,
-						     -1,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("default-height",
+                                                        P_("Default Height"),
+                                                        P_("The default height of the window, used when initially showing the window"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
   
   g_object_class_install_property (gobject_class,
                                    PROP_DESTROY_WITH_PARENT,
@@ -902,9 +901,30 @@ gtk_window_init (GtkWindow *window)
 
   g_signal_connect (window->screen, "composited_changed",
 		    G_CALLBACK (gtk_window_on_composited_changed), window);
+  g_signal_connect (window->screen,
+                    "unit-changed",
+                    G_CALLBACK (gtk_window_on_unit_changed),
+                    window);
 }
 
 static void
+gtk_window_on_unit_changed (GdkScreen *screen, gdouble em_factor, GtkWindow *window)
+{
+  GtkWidget *widget = GTK_WIDGET (window);
+  gint width, height;
+
+  /* ugh; don't want to do this for *every* top-level; make GSettings do it */
+  _gtk_settings_reset_styles_for_unit_change (gtk_settings_get_for_screen (window->screen));
+
+  gtk_window_get_size (window, &width, &height);
+  gtk_window_resize (window,
+                     MAX (10, width * em_factor),
+                     MAX (10, height * em_factor));
+
+  _gtk_widget_propagate_unit_changed (widget);
+}
+
+static void
 gtk_window_set_property (GObject      *object,
 			 guint         prop_id,
 			 const GValue *value,
@@ -950,13 +970,13 @@ gtk_window_set_property (GObject      *object,
       break;
     case PROP_DEFAULT_WIDTH:
       gtk_window_set_default_size_internal (window,
-                                            TRUE, g_value_get_int (value),
+                                            TRUE, gdk_value_get_unit (value),
                                             FALSE, -1, FALSE);
       break;
     case PROP_DEFAULT_HEIGHT:
       gtk_window_set_default_size_internal (window,
                                             FALSE, -1,
-                                            TRUE, g_value_get_int (value), FALSE);
+                                            TRUE, gdk_value_get_unit (value), FALSE);
       break;
     case PROP_DESTROY_WITH_PARENT:
       gtk_window_set_destroy_with_parent (window, g_value_get_boolean (value));
@@ -1058,16 +1078,16 @@ gtk_window_get_property (GObject      *object,
     case PROP_DEFAULT_WIDTH:
       info = gtk_window_get_geometry_info (window, FALSE);
       if (!info)
-	g_value_set_int (value, -1);
+	gdk_value_set_unit (value, -1);
       else
-	g_value_set_int (value, info->default_width);
+	gdk_value_set_unit (value, info->default_width);
       break;
     case PROP_DEFAULT_HEIGHT:
       info = gtk_window_get_geometry_info (window, FALSE);
       if (!info)
-	g_value_set_int (value, -1);
+	gdk_value_set_unit (value, -1);
       else
-	g_value_set_int (value, info->default_height);
+	gdk_value_set_unit (value, info->default_height);
       break;
     case PROP_DESTROY_WITH_PARENT:
       g_value_set_boolean (value, window->destroy_with_parent);
@@ -3656,9 +3676,9 @@ gtk_window_get_default_icon_list (void)
 static void
 gtk_window_set_default_size_internal (GtkWindow    *window,
                                       gboolean      change_width,
-                                      gint          width,
+                                      GdkUnit       width,
                                       gboolean      change_height,
-                                      gint          height,
+                                      GdkUnit       height,
 				      gboolean      is_geometry)
 {
   GtkWindowGeometryInfo *info;
@@ -3740,8 +3760,8 @@ gtk_window_set_default_size_internal (GtkWindow
  **/
 void       
 gtk_window_set_default_size (GtkWindow   *window,
-			     gint         width,
-			     gint         height)
+			     GdkUnit      width,
+			     GdkUnit      height)
 {
   g_return_if_fail (GTK_IS_WINDOW (window));
   g_return_if_fail (width >= -1);
@@ -3774,6 +3794,34 @@ gtk_window_get_default_size (GtkWindow *window,
   info = gtk_window_get_geometry_info (window, FALSE);
 
   if (width)
+    *width = info ? GDK_UNIT_TO_PIXEL (info->default_width) : -1;
+
+  if (height)
+    *height = info ? GDK_UNIT_TO_PIXEL (info->default_height) : -1;
+}
+
+/**
+ * gtk_window_get_default_size_unit:
+ * @window: a #GtkWindow
+ * @width: location to store the default width, or %NULL
+ * @height: location to store the default height, or %NULL
+ *
+ * Like gtk_window_get_default_size() but preserves the unit.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_window_get_default_size_unit (GtkWindow *window,
+                                  GdkUnit   *width,
+                                  GdkUnit   *height)
+{
+  GtkWindowGeometryInfo *info;
+
+  g_return_if_fail (GTK_IS_WINDOW (window));
+
+  info = gtk_window_get_geometry_info (window, FALSE);
+
+  if (width)
     *width = info ? info->default_width : -1;
 
   if (height)
@@ -4257,6 +4305,8 @@ gtk_window_finalize (GObject *object)
     {
       g_signal_handlers_disconnect_by_func (window->screen,
 					    gtk_window_on_composited_changed, window);
+      g_signal_handlers_disconnect_by_func (window->screen,
+					    gtk_window_on_unit_changed, window);
     }
       
   G_OBJECT_CLASS (gtk_window_parent_class)->finalize (object);
@@ -5451,10 +5501,10 @@ gtk_window_compute_configure_request_size (GtkWind
 	     }
 	     
 	   if (info->default_width > 0)
-	     *width = MAX (info->default_width * width_inc + base_width, min_width);
+	     *width = MAX (GDK_UNIT_TO_PIXEL (info->default_width) * width_inc + base_width, min_width);
 	   
 	   if (info->default_height > 0)
-	     *height = MAX (info->default_height * height_inc + base_height, min_height);
+	     *height = MAX (GDK_UNIT_TO_PIXEL (info->default_height) * height_inc + base_height, min_height);
          }
     }
   else
@@ -7251,6 +7301,13 @@ gtk_window_set_screen (GtkWindow *window,
       g_signal_connect (screen, "composited_changed", 
 			G_CALLBACK (gtk_window_on_composited_changed), window);
       
+      g_signal_handlers_disconnect_by_func (previous_screen,
+					    gtk_window_on_unit_changed, window);
+      g_signal_connect (window->screen,
+                        "unit-changed",
+                        G_CALLBACK (gtk_window_on_unit_changed),
+                        window);
+
       _gtk_widget_propagate_screen_changed (widget, previous_screen);
       _gtk_widget_propagate_composited_changed (widget);
     }
Index: gtk/gtktoolbutton.c
===================================================================
--- gtk/gtktoolbutton.c	(revision 21028)
+++ gtk/gtktoolbutton.c	(working copy)
@@ -235,13 +235,11 @@ gtk_tool_button_class_init (GtkToolButtonClass *kl
    * Since: 2.10
    */
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("icon-spacing",
-							     P_("Icon spacing"),
-							     P_("Spacing in pixels between the icon and label"),
-							     0,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READWRITE));
+					   gdk_param_spec_unit ("icon-spacing",
+                                                                P_("Icon spacing"),
+                                                                P_("Spacing in pixels between the icon and label"),
+                                                                0,
+                                                                GTK_PARAM_READWRITE));
 
 /**
  * GtkToolButton::clicked:
@@ -295,13 +293,13 @@ gtk_tool_button_construct_contents (GtkToolItem *t
   gboolean need_icon = FALSE;
   GtkIconSize icon_size;
   GtkWidget *box = NULL;
-  guint icon_spacing;
+  GdkUnit icon_spacing;
 
   button->priv->contents_invalid = FALSE;
 
-  gtk_widget_style_get (GTK_WIDGET (tool_item), 
-			"icon-spacing", &icon_spacing,
-			NULL);
+  gtk_widget_style_get_unit (GTK_WIDGET (tool_item), 
+                             "icon-spacing", &icon_spacing,
+                             NULL);
 
   if (button->priv->icon_widget && button->priv->icon_widget->parent)
     {
@@ -679,14 +677,14 @@ static void
 gtk_tool_button_update_icon_spacing (GtkToolButton *button)
 {
   GtkWidget *box;
-  guint spacing;
+  GdkUnit spacing;
 
   box = GTK_BIN (button->priv->button)->child;
   if (GTK_IS_BOX (box))
     {
-      gtk_widget_style_get (GTK_WIDGET (button), 
-			    "icon-spacing", &spacing,
-			    NULL);
+      gtk_widget_style_get_unit (GTK_WIDGET (button), 
+                                 "icon-spacing", &spacing,
+                                 NULL);
       gtk_box_set_spacing (GTK_BOX (box), spacing);      
     }
 }
Index: gtk/gtkwindow.h
===================================================================
--- gtk/gtkwindow.h	(revision 21028)
+++ gtk/gtkwindow.h	(working copy)
@@ -359,11 +359,14 @@ void       gtk_window_set_policy               (Gt
  * resize operations)
  */
 void     gtk_window_set_default_size (GtkWindow   *window,
-                                      gint         width,
-                                      gint         height);
+                                      GdkUnit      width,
+                                      GdkUnit      height);
 void     gtk_window_get_default_size (GtkWindow   *window,
                                       gint        *width,
                                       gint        *height);
+void     gtk_window_get_default_size_unit (GtkWindow   *window,
+                                           GdkUnit     *width,
+                                           GdkUnit     *height);
 void     gtk_window_resize           (GtkWindow   *window,
                                       gint         width,
                                       gint         height);
Index: gtk/gtkmain.c
===================================================================
--- gtk/gtkmain.c	(revision 21028)
+++ gtk/gtkmain.c	(working copy)
@@ -2432,15 +2432,15 @@ gtk_print (gchar *str)
       gtk_widget_show (box1);
       
       
-      box2 = gtk_vbox_new (FALSE, 10);
-      gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+      box2 = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (10));
+      gtk_container_set_border_width (GTK_CONTAINER (box2), GDK_UNIT_ONE_TWELFTH_EM (10));
       gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
       gtk_widget_show (box2);
       
       
       table = gtk_table_new (2, 2, FALSE);
-      gtk_table_set_row_spacing (GTK_TABLE (table), 0, 2);
-      gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
+      gtk_table_set_row_spacing (GTK_TABLE (table), 0, GDK_UNIT_ONE_TWELFTH_EM (2));
+      gtk_table_set_col_spacing (GTK_TABLE (table), 0, GDK_UNIT_ONE_TWELFTH_EM (2));
       gtk_box_pack_start (GTK_BOX (box2), table, TRUE, TRUE, 0);
       gtk_widget_show (table);
       
@@ -2465,8 +2465,8 @@ gtk_print (gchar *str)
       gtk_widget_show (separator);
       
       
-      box2 = gtk_vbox_new (FALSE, 10);
-      gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+      box2 = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (10));
+      gtk_container_set_border_width (GTK_CONTAINER (box2), GDK_UNIT_ONE_TWELFTH_EM (10));
       gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
       gtk_widget_show (box2);
       
Index: gtk/gtktable.c
===================================================================
--- gtk/gtktable.c	(revision 21028)
+++ gtk/gtktable.c	(working copy)
@@ -53,7 +53,29 @@ enum
   CHILD_PROP_Y_PADDING
 };
   
+#define GTK_TABLE_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_TABLE, GtkTablePrivate))
 
+typedef struct
+{
+  GdkUUnit xpadding_unit;
+  GdkUUnit ypadding_unit;
+} GtkTableChildPrivate;
+
+typedef struct
+{
+  GdkUUnit spacing_unit;
+} GtkTableRowColPrivate;
+
+struct _GtkTablePrivate
+{
+  GList *children;
+  GtkTableRowColPrivate *rows;
+  GtkTableRowColPrivate *cols;
+
+  GdkUUnit column_spacing_unit;
+  GdkUUnit row_spacing_unit;
+};
+
 static void gtk_table_finalize	    (GObject	    *object);
 static void gtk_table_size_request  (GtkWidget	    *widget,
 				     GtkRequisition *requisition);
@@ -87,6 +109,7 @@ static void gtk_table_get_child_property (GtkConta
 					  GParamSpec      *pspec);
 static GType gtk_table_child_type   (GtkContainer   *container);
 
+static void gtk_table_unit_changed (GtkWidget *widget);
 
 static void gtk_table_size_request_init	 (GtkTable *table);
 static void gtk_table_size_request_pass1 (GtkTable *table);
@@ -114,6 +137,7 @@ gtk_table_class_init (GtkTableClass *class)
   
   widget_class->size_request = gtk_table_size_request;
   widget_class->size_allocate = gtk_table_size_allocate;
+  widget_class->unit_changed = gtk_table_unit_changed;
   
   container_class->add = gtk_table_add;
   container_class->remove = gtk_table_remove;
@@ -143,22 +167,18 @@ gtk_table_class_init (GtkTableClass *class)
 						     GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
                                    PROP_ROW_SPACING,
-                                   g_param_spec_uint ("row-spacing",
-						     P_("Row spacing"),
-						     P_("The amount of space between two consecutive rows"),
-						     0,
-						     G_MAXUINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit ("row-spacing",
+                                                         P_("Row spacing"),
+                                                         P_("The amount of space between two consecutive rows"),
+                                                         0,
+                                                         GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
                                    PROP_COLUMN_SPACING,
-                                   g_param_spec_uint ("column-spacing",
-						     P_("Column spacing"),
-						     P_("The amount of space between two consecutive columns"),
-						     0,
-						     G_MAXUINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit ("column-spacing",
+                                                         P_("Column spacing"),
+                                                         P_("The amount of space between two consecutive columns"),
+                                                         0,
+                                                         GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
                                    PROP_HOMOGENEOUS,
                                    g_param_spec_boolean ("homogeneous",
@@ -211,18 +231,20 @@ gtk_table_class_init (GtkTableClass *class)
 								  GTK_PARAM_READWRITE));
   gtk_container_class_install_child_property (container_class,
 					      CHILD_PROP_X_PADDING,
-					      g_param_spec_uint ("x-padding", 
-								 P_("Horizontal padding"), 
-								 P_("Extra space to put between the child and its left and right neighbors, in pixels"),
-								 0, 65535, 0,
-								 GTK_PARAM_READWRITE));
+					      gdk_param_spec_uunit ("x-padding", 
+                                                                    P_("Horizontal padding"), 
+                                                                    P_("Extra space to put between the child and its left and right neighbors, in pixels"),
+                                                                    0,
+                                                                    GTK_PARAM_READWRITE));
   gtk_container_class_install_child_property (container_class,
 					      CHILD_PROP_Y_PADDING,
-					      g_param_spec_uint ("y-padding", 
-								 P_("Vertical padding"), 
-								 P_("Extra space to put between the child and its upper and lower neighbors, in pixels"),
-								 0, 65535, 0,
-								 GTK_PARAM_READWRITE));
+					      gdk_param_spec_uunit ("y-padding", 
+                                                                    P_("Vertical padding"), 
+                                                                    P_("Extra space to put between the child and its upper and lower neighbors, in pixels"),
+                                                                    0,
+                                                                    GTK_PARAM_READWRITE));
+
+  g_type_class_add_private (gobject_class, sizeof (GtkTablePrivate));
 }
 
 static GType
@@ -238,8 +260,10 @@ gtk_table_get_property (GObject      *object,
 			GParamSpec   *pspec)
 {
   GtkTable *table;
+  GtkTablePrivate *priv;
 
   table = GTK_TABLE (object);
+  priv = GTK_TABLE_GET_PRIVATE (table);
 
   switch (prop_id)
     {
@@ -250,10 +274,10 @@ gtk_table_get_property (GObject      *object,
       g_value_set_uint (value, table->ncols);
       break;
     case PROP_ROW_SPACING:
-      g_value_set_uint (value, table->row_spacing);
+      gdk_value_set_uunit (value, priv->row_spacing_unit);
       break;
     case PROP_COLUMN_SPACING:
-      g_value_set_uint (value, table->column_spacing);
+      gdk_value_set_uunit (value, priv->column_spacing_unit);
       break;
     case PROP_HOMOGENEOUS:
       g_value_set_boolean (value, table->homogeneous);
@@ -283,10 +307,10 @@ gtk_table_set_property (GObject      *object,
       gtk_table_resize (table, table->nrows, g_value_get_uint (value));
       break;
     case PROP_ROW_SPACING:
-      gtk_table_set_row_spacings (table, g_value_get_uint (value));
+      gtk_table_set_row_spacings (table, gdk_value_get_uunit (value));
       break;
     case PROP_COLUMN_SPACING:
-      gtk_table_set_col_spacings (table, g_value_get_uint (value));
+      gtk_table_set_col_spacings (table, gdk_value_get_uunit (value));
       break;
     case PROP_HOMOGENEOUS:
       gtk_table_set_homogeneous (table, g_value_get_boolean (value));
@@ -305,13 +329,18 @@ gtk_table_set_child_property (GtkContainer    *con
 			      GParamSpec      *pspec)
 {
   GtkTable *table = GTK_TABLE (container);
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   GtkTableChild *table_child;
+  GtkTableChildPrivate *priv_table_child;
   GList *list;
+  GList *priv_list;
 
   table_child = NULL;
-  for (list = table->children; list; list = list->next)
+  priv_table_child = NULL;
+  for (list = table->children, priv_list = priv->children; list; list = list->next, priv_list = priv_list->next)
     {
       table_child = list->data;
+      priv_table_child = list->data;
 
       if (table_child->widget == child)
 	break;
@@ -363,10 +392,12 @@ gtk_table_set_child_property (GtkContainer    *con
       table_child->yfill = (g_value_get_flags (value) & GTK_FILL) != 0;
       break;
     case CHILD_PROP_X_PADDING:
-      table_child->xpadding = g_value_get_uint (value);
+      priv_table_child->xpadding_unit = gdk_value_get_uunit (value);
+      table_child->xpadding = GDK_UNIT_TO_PIXEL (priv_table_child->xpadding_unit);
       break;
     case CHILD_PROP_Y_PADDING:
-      table_child->ypadding = g_value_get_uint (value);
+      priv_table_child->ypadding_unit = gdk_value_get_uunit (value);
+      table_child->ypadding = GDK_UNIT_TO_PIXEL (priv_table_child->ypadding_unit);
       break;
     default:
       GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
@@ -384,13 +415,18 @@ gtk_table_get_child_property (GtkContainer    *con
 			      GParamSpec      *pspec)
 {
   GtkTable *table = GTK_TABLE (container);
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   GtkTableChild *table_child;
+  GtkTableChildPrivate *priv_table_child;
   GList *list;
+  GList *priv_list;
 
   table_child = NULL;
-  for (list = table->children; list; list = list->next)
+  priv_table_child = NULL;
+  for (list = table->children, priv_list = priv->children; list; list = list->next, priv_list = priv_list->next)
     {
       table_child = list->data;
+      priv_table_child = list->data;
 
       if (table_child->widget == child)
 	break;
@@ -426,10 +462,10 @@ gtk_table_get_child_property (GtkContainer    *con
 				 table_child->yfill * GTK_FILL));
       break;
     case CHILD_PROP_X_PADDING:
-      g_value_set_uint (value, table_child->xpadding);
+      gdk_value_set_uunit (value, priv_table_child->xpadding_unit);
       break;
     case CHILD_PROP_Y_PADDING:
-      g_value_set_uint (value, table_child->ypadding);
+      gdk_value_set_uunit (value, priv_table_child->ypadding_unit);
       break;
     default:
       GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
@@ -440,6 +476,8 @@ gtk_table_get_child_property (GtkContainer    *con
 static void
 gtk_table_init (GtkTable *table)
 {
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
+
   GTK_WIDGET_SET_FLAGS (table, GTK_NO_WINDOW);
   gtk_widget_set_redraw_on_allocate (GTK_WIDGET (table), FALSE);
   
@@ -452,6 +490,12 @@ gtk_table_init (GtkTable *table)
   table->row_spacing = 0;
   table->homogeneous = FALSE;
 
+  priv->column_spacing_unit = 0;
+  priv->row_spacing_unit = 0;
+  priv->children = NULL;
+  priv->rows = NULL;
+  priv->cols = NULL;
+
   gtk_table_resize (table, 1, 1);
 }
 
@@ -481,10 +525,14 @@ gtk_table_resize (GtkTable *table,
 		  guint     n_rows,
 		  guint     n_cols)
 {
+  GtkTablePrivate *priv;
+
   g_return_if_fail (GTK_IS_TABLE (table));
   g_return_if_fail (n_rows > 0 && n_rows < 65536);
   g_return_if_fail (n_cols > 0 && n_cols < 65536);
 
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
   n_rows = MAX (n_rows, 1);
   n_cols = MAX (n_cols, 1);
 
@@ -510,16 +558,18 @@ gtk_table_resize (GtkTable *table,
 	  i = table->nrows;
 	  table->nrows = n_rows;
 	  table->rows = g_realloc (table->rows, table->nrows * sizeof (GtkTableRowCol));
+	  priv->rows = g_realloc (priv->rows, table->nrows * sizeof (GtkTableRowColPrivate));
 	  
 	  for (; i < table->nrows; i++)
 	    {
 	      table->rows[i].requisition = 0;
 	      table->rows[i].allocation = 0;
-	      table->rows[i].spacing = table->row_spacing;
+	      table->rows[i].spacing = GDK_UNIT_TO_PIXEL (priv->row_spacing_unit);
 	      table->rows[i].need_expand = 0;
 	      table->rows[i].need_shrink = 0;
 	      table->rows[i].expand = 0;
 	      table->rows[i].shrink = 0;
+	      priv->rows[i].spacing_unit = priv->row_spacing_unit;
 	    }
 
 	  g_object_notify (G_OBJECT (table), "n-rows");
@@ -532,16 +582,18 @@ gtk_table_resize (GtkTable *table,
 	  i = table->ncols;
 	  table->ncols = n_cols;
 	  table->cols = g_realloc (table->cols, table->ncols * sizeof (GtkTableRowCol));
+	  priv->cols = g_realloc (priv->cols, table->ncols * sizeof (GtkTableRowColPrivate));
 	  
 	  for (; i < table->ncols; i++)
 	    {
 	      table->cols[i].requisition = 0;
 	      table->cols[i].allocation = 0;
-	      table->cols[i].spacing = table->column_spacing;
+	      table->cols[i].spacing = GDK_UNIT_TO_PIXEL (priv->column_spacing_unit);
 	      table->cols[i].need_expand = 0;
 	      table->cols[i].need_shrink = 0;
 	      table->cols[i].expand = 0;
 	      table->cols[i].shrink = 0;
+	      priv->cols[i].spacing_unit = priv->column_spacing_unit;
 	    }
 
 	  g_object_notify (G_OBJECT (table), "n-columns");
@@ -558,14 +610,18 @@ gtk_table_attach (GtkTable	  *table,
 		  guint		   bottom_attach,
 		  GtkAttachOptions xoptions,
 		  GtkAttachOptions yoptions,
-		  guint		   xpadding,
-		  guint		   ypadding)
+		  GdkUUnit         xpadding,
+		  GdkUUnit         ypadding)
 {
+  GtkTablePrivate *priv;
   GtkTableChild *table_child;
+  GtkTableChildPrivate *priv_table_child;
   
   g_return_if_fail (GTK_IS_TABLE (table));
   g_return_if_fail (GTK_IS_WIDGET (child));
   g_return_if_fail (child->parent == NULL);
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
   
   /* g_return_if_fail (left_attach >= 0); */
   g_return_if_fail (left_attach < right_attach);
@@ -587,13 +643,18 @@ gtk_table_attach (GtkTable	  *table,
   table_child->xexpand = (xoptions & GTK_EXPAND) != 0;
   table_child->xshrink = (xoptions & GTK_SHRINK) != 0;
   table_child->xfill = (xoptions & GTK_FILL) != 0;
-  table_child->xpadding = xpadding;
+  table_child->xpadding = GDK_UNIT_TO_PIXEL (xpadding);
   table_child->yexpand = (yoptions & GTK_EXPAND) != 0;
   table_child->yshrink = (yoptions & GTK_SHRINK) != 0;
   table_child->yfill = (yoptions & GTK_FILL) != 0;
-  table_child->ypadding = ypadding;
+  table_child->ypadding = GDK_UNIT_TO_PIXEL (ypadding);
+
+  priv_table_child = g_new (GtkTableChildPrivate, 1);
+  priv_table_child->xpadding_unit = xpadding;
+  priv_table_child->ypadding_unit = ypadding;
   
   table->children = g_list_prepend (table->children, table_child);
+  priv->children = g_list_prepend (priv->children, priv_table_child);
   
   gtk_widget_set_parent (child, GTK_WIDGET (table));
 }
@@ -617,14 +678,19 @@ gtk_table_attach_defaults (GtkTable  *table,
 void
 gtk_table_set_row_spacing (GtkTable *table,
 			   guint     row,
-			   guint     spacing)
+			   GdkUUnit  spacing)
 {
+  GtkTablePrivate *priv;
+
   g_return_if_fail (GTK_IS_TABLE (table));
   g_return_if_fail (row < table->nrows);
-  
-  if (table->rows[row].spacing != spacing)
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  if (table->rows[row].spacing != GDK_UNIT_TO_PIXEL (spacing))
     {
-      table->rows[row].spacing = spacing;
+      table->rows[row].spacing = GDK_UNIT_TO_PIXEL (spacing);
+      priv->rows[row].spacing_unit = spacing;
       
       if (GTK_WIDGET_VISIBLE (table))
 	gtk_widget_queue_resize (GTK_WIDGET (table));
@@ -647,21 +713,51 @@ gtk_table_get_row_spacing (GtkTable *table,
 {
   g_return_val_if_fail (GTK_IS_TABLE (table), 0);
   g_return_val_if_fail (row < table->nrows - 1, 0);
- 
+
   return table->rows[row].spacing;
 }
 
+/**
+ * gtk_table_get_row_spacing_unit:
+ * @table: a #GtkTable
+ * @row: a row in the table, 0 indicates the first row
+ *
+ * Like gtk_table_get_row_spacing() but preserves the unit.
+ *
+ * Return value: the column spacing
+ *
+ * Since: 2.14
+ **/
+GdkUUnit
+gtk_table_get_row_spacing_unit (GtkTable *table,
+                                guint     row)
+{
+  GtkTablePrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_TABLE (table), 0);
+  g_return_val_if_fail (row < table->nrows - 1, 0);
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  return priv->rows[row].spacing_unit;
+}
+
 void
 gtk_table_set_col_spacing (GtkTable *table,
 			   guint     column,
-			   guint     spacing)
+			   GdkUUnit  spacing)
 {
+  GtkTablePrivate *priv;
+
   g_return_if_fail (GTK_IS_TABLE (table));
   g_return_if_fail (column < table->ncols);
-  
-  if (table->cols[column].spacing != spacing)
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  if (table->cols[column].spacing != GDK_UNIT_TO_PIXEL (spacing))
     {
-      table->cols[column].spacing = spacing;
+      table->cols[column].spacing = GDK_UNIT_TO_PIXEL (spacing);
+      priv->cols[column].spacing_unit = spacing;
       
       if (GTK_WIDGET_VISIBLE (table))
 	gtk_widget_queue_resize (GTK_WIDGET (table));
@@ -688,17 +784,49 @@ gtk_table_get_col_spacing (GtkTable *table,
   return table->cols[column].spacing;
 }
 
+/**
+ * gtk_table_get_col_spacing_unit:
+ * @table: a #GtkTable
+ * @column: a column in the table, 0 indicates the first column
+ *
+ * Like gtk_table_get_col_spacing() but preserves the unit.
+ *
+ * Return value: the column spacing
+ *
+ * Since: 2.14
+ **/
+GdkUUnit
+gtk_table_get_col_spacing_unit (GtkTable *table,
+                                guint     column)
+{
+  GtkTablePrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_TABLE (table), 0);
+  g_return_val_if_fail (column < table->ncols, 0);
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  return priv->cols[column].spacing_unit;
+}
+
 void
 gtk_table_set_row_spacings (GtkTable *table,
-			    guint     spacing)
+			    GdkUUnit  spacing)
 {
   guint row;
+  GtkTablePrivate *priv;
   
   g_return_if_fail (GTK_IS_TABLE (table));
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
   
-  table->row_spacing = spacing;
+  table->row_spacing = GDK_UNIT_TO_PIXEL (spacing);
+  priv->row_spacing_unit = spacing;
   for (row = 0; row < table->nrows; row++)
-    table->rows[row].spacing = spacing;
+    {
+      table->rows[row].spacing = GDK_UNIT_TO_PIXEL (spacing);
+      priv->rows[row].spacing_unit = spacing;
+    }
   
   if (GTK_WIDGET_VISIBLE (table))
     gtk_widget_queue_resize (GTK_WIDGET (table));
@@ -719,22 +847,55 @@ gtk_table_set_row_spacings (GtkTable *table,
 guint
 gtk_table_get_default_row_spacing (GtkTable *table)
 {
+  GtkTablePrivate *priv;
+
   g_return_val_if_fail (GTK_IS_TABLE (table), 0);
 
-  return table->row_spacing;
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  return GDK_UNIT_TO_PIXEL (priv->row_spacing_unit);
 }
 
+/**
+ * gtk_table_get_default_row_spacing_unit:
+ * @table: a #GtkTable
+ *
+ * Like gtk_table_get_default_row_spacing() but preserves the unit.
+ *
+ * Return value: the default row spacing
+ *
+ * Since: 2.14
+ **/
+GdkUUnit
+gtk_table_get_default_row_spacing_unit (GtkTable *table)
+{
+  GtkTablePrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_TABLE (table), 0);
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  return priv->row_spacing_unit;
+}
+
 void
 gtk_table_set_col_spacings (GtkTable *table,
-			    guint     spacing)
+			    GdkUUnit  spacing)
 {
   guint col;
+  GtkTablePrivate *priv;
   
   g_return_if_fail (GTK_IS_TABLE (table));
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
   
-  table->column_spacing = spacing;
+  table->column_spacing = GDK_UNIT_TO_PIXEL (spacing);
+  priv->column_spacing_unit = spacing;
   for (col = 0; col < table->ncols; col++)
-    table->cols[col].spacing = spacing;
+    {
+      table->cols[col].spacing = GDK_UNIT_TO_PIXEL (spacing);
+      priv->cols[col].spacing_unit = spacing;
+    }
   
   if (GTK_WIDGET_VISIBLE (table))
     gtk_widget_queue_resize (GTK_WIDGET (table));
@@ -755,11 +916,37 @@ gtk_table_set_col_spacings (GtkTable *table,
 guint
 gtk_table_get_default_col_spacing (GtkTable *table)
 {
+  GtkTablePrivate *priv;
+
   g_return_val_if_fail (GTK_IS_TABLE (table), 0);
 
-  return table->column_spacing;
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  return GDK_UNIT_TO_PIXEL (priv->column_spacing_unit);
 }
 
+/**
+ * gtk_table_get_default_col_spacing_unit:
+ * @table: a #GtkTable
+ *
+ * Like gtk_table_get_default_col_spacing() but preserves the unit.
+ *
+ * Return value: the default column spacing
+ *
+ * Since: 2.14
+ **/
+GdkUUnit
+gtk_table_get_default_col_spacing_unit (GtkTable *table)
+{
+  GtkTablePrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_TABLE (table), 0);
+
+  priv = GTK_TABLE_GET_PRIVATE (table);
+
+  return priv->column_spacing_unit;
+}
+
 void
 gtk_table_set_homogeneous (GtkTable *table,
 			   gboolean  homogeneous)
@@ -799,9 +986,12 @@ static void
 gtk_table_finalize (GObject *object)
 {
   GtkTable *table = GTK_TABLE (object);
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
 
   g_free (table->rows);
   g_free (table->cols);
+  g_free (priv->rows);
+  g_free (priv->cols);
   
   G_OBJECT_CLASS (gtk_table_parent_class)->finalize (object);
 }
@@ -811,6 +1001,7 @@ gtk_table_size_request (GtkWidget      *widget,
 			GtkRequisition *requisition)
 {
   GtkTable *table = GTK_TABLE (widget);
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   gint row, col;
 
   requisition->width = 0;
@@ -825,12 +1016,12 @@ gtk_table_size_request (GtkWidget      *widget,
   for (col = 0; col < table->ncols; col++)
     requisition->width += table->cols[col].requisition;
   for (col = 0; col + 1 < table->ncols; col++)
-    requisition->width += table->cols[col].spacing;
+    requisition->width += GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
   
   for (row = 0; row < table->nrows; row++)
     requisition->height += table->rows[row].requisition;
   for (row = 0; row + 1 < table->nrows; row++)
-    requisition->height += table->rows[row].spacing;
+    requisition->height += GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
   
   requisition->width += GTK_CONTAINER (table)->border_width * 2;
   requisition->height += GTK_CONTAINER (table)->border_width * 2;
@@ -861,15 +1052,21 @@ gtk_table_remove (GtkContainer *container,
 		  GtkWidget    *widget)
 {
   GtkTable *table = GTK_TABLE (container);
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   GtkTableChild *child;
+  GtkTableChildPrivate *priv_child;
   GList *children;
+  GList *priv_children;
 
   children = table->children;
+  priv_children = priv->children;
   
   while (children)
     {
       child = children->data;
       children = children->next;
+      priv_child = priv_children->data;
+      priv_children = priv_children->next;
       
       if (child->widget == widget)
 	{
@@ -879,6 +1076,8 @@ gtk_table_remove (GtkContainer *container,
 	  
 	  table->children = g_list_remove (table->children, child);
 	  g_free (child);
+	  priv->children = g_list_remove (priv->children, priv_child);
+	  g_free (priv_child);
 	  
 	  if (was_visible && GTK_WIDGET_VISIBLE (container))
 	    gtk_widget_queue_resize (GTK_WIDGET (container));
@@ -946,16 +1145,22 @@ gtk_table_size_request_init (GtkTable *table)
 static void
 gtk_table_size_request_pass1 (GtkTable *table)
 {
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   GtkTableChild *child;
+  GtkTableChildPrivate *priv_child;
   GList *children;
+  GList *priv_children;
   gint width;
   gint height;
   
   children = table->children;
+  priv_children = priv->children;
   while (children)
     {
       child = children->data;
       children = children->next;
+      priv_child = priv_children->data;
+      priv_children = priv_children->next;
       
       if (GTK_WIDGET_VISIBLE (child->widget))
 	{
@@ -966,7 +1171,7 @@ gtk_table_size_request_pass1 (GtkTable *table)
 	   */
 	  if (child->left_attach == (child->right_attach - 1))
 	    {
-	      width = child_requisition.width + child->xpadding * 2;
+	      width = child_requisition.width + GDK_UNIT_TO_PIXEL (priv_child->xpadding_unit) * 2;
 	      table->cols[child->left_attach].requisition = MAX (table->cols[child->left_attach].requisition, width);
 	    }
 	  
@@ -974,7 +1179,7 @@ gtk_table_size_request_pass1 (GtkTable *table)
 	   */
 	  if (child->top_attach == (child->bottom_attach - 1))
 	    {
-	      height = child_requisition.height + child->ypadding * 2;
+	      height = child_requisition.height + GDK_UNIT_TO_PIXEL (priv_child->ypadding_unit) * 2;
 	      table->rows[child->top_attach].requisition = MAX (table->rows[child->top_attach].requisition, height);
 	    }
 	}
@@ -1008,17 +1213,23 @@ gtk_table_size_request_pass2 (GtkTable *table)
 static void
 gtk_table_size_request_pass3 (GtkTable *table)
 {
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   GtkTableChild *child;
+  GtkTableChildPrivate *priv_child;
   GList *children;
+  GList *priv_children;
   gint width, height;
   gint row, col;
   gint extra;
   
   children = table->children;
+  priv_children = priv->children;
   while (children)
     {
       child = children->data;
       children = children->next;
+      priv_child = priv_children->data;
+      priv_children = priv_children->next;
       
       if (GTK_WIDGET_VISIBLE (child->widget))
 	{
@@ -1038,19 +1249,19 @@ gtk_table_size_request_pass3 (GtkTable *table)
 		{
 		  width += table->cols[col].requisition;
 		  if ((col + 1) < child->right_attach)
-		    width += table->cols[col].spacing;
+		    width += GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
 		}
 	      
 	      /* If we need to request more space for this child to fill
 	       *  its requisition, then divide up the needed space amongst the
 	       *  columns it spans, favoring expandable columns if any.
 	       */
-	      if (width < child_requisition.width + child->xpadding * 2)
+	      if (width < child_requisition.width + GDK_UNIT_TO_PIXEL (priv_child->xpadding_unit) * 2)
 		{
 		  gint n_expand = 0;
 		  gboolean force_expand = FALSE;
 		  
-		  width = child_requisition.width + child->xpadding * 2 - width;
+		  width = child_requisition.width + GDK_UNIT_TO_PIXEL (priv_child->xpadding_unit) * 2 - width;
 
 		  for (col = child->left_attach; col < child->right_attach; col++)
 		    if (table->cols[col].expand)
@@ -1089,19 +1300,19 @@ gtk_table_size_request_pass3 (GtkTable *table)
 		{
 		  height += table->rows[row].requisition;
 		  if ((row + 1) < child->bottom_attach)
-		    height += table->rows[row].spacing;
+		    height += GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
 		}
 	      
 	      /* If we need to request more space for this child to fill
 	       *  its requisition, then divide up the needed space amongst the
 	       *  rows it spans, favoring expandable rows if any.
 	       */
-	      if (height < child_requisition.height + child->ypadding * 2)
+	      if (height < child_requisition.height + GDK_UNIT_TO_PIXEL (priv_child->ypadding_unit) * 2)
 		{
 		  gint n_expand = 0;
 		  gboolean force_expand = FALSE;
 		  
-		  height = child_requisition.height + child->ypadding * 2 - height;
+		  height = child_requisition.height + GDK_UNIT_TO_PIXEL (priv_child->ypadding_unit) * 2 - height;
 		  
 		  for (row = child->top_attach; row < child->bottom_attach; row++)
 		    {
@@ -1326,6 +1537,7 @@ gtk_table_size_allocate_init (GtkTable *table)
 static void
 gtk_table_size_allocate_pass1 (GtkTable *table)
 {
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   gint real_width;
   gint real_height;
   gint width, height;
@@ -1360,7 +1572,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
 	{
 	  width = real_width;
 	  for (col = 0; col + 1 < table->ncols; col++)
-	    width -= table->cols[col].spacing;
+	    width -= GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
 	  
 	  for (col = 0; col < table->ncols; col++)
 	    {
@@ -1385,7 +1597,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
 	    nshrink += 1;
 	}
       for (col = 0; col + 1 < table->ncols; col++)
-	width += table->cols[col].spacing;
+	width += GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
       
       /* Check to see if we were allocated more width than we requested.
        */
@@ -1452,7 +1664,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
 	  height = real_height;
 	  
 	  for (row = 0; row + 1 < table->nrows; row++)
-	    height -= table->rows[row].spacing;
+	    height -= GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
 	  
 	  
 	  for (row = 0; row < table->nrows; row++)
@@ -1478,7 +1690,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
 	    nshrink += 1;
 	}
       for (row = 0; row + 1 < table->nrows; row++)
-	height += table->rows[row].spacing;
+	height += GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
       
       /* Check to see if we were allocated more height than we requested.
        */
@@ -1530,8 +1742,11 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
 static void
 gtk_table_size_allocate_pass2 (GtkTable *table)
 {
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
   GtkTableChild *child;
+  GtkTableChildPrivate *priv_child;
   GList *children;
+  GList *priv_children;
   gint max_width;
   gint max_height;
   gint x, y;
@@ -1540,10 +1755,13 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
   GtkWidget *widget = GTK_WIDGET (table);
   
   children = table->children;
+  priv_children = priv->children;
   while (children)
     {
       child = children->data;
       children = children->next;
+      priv_child = priv_children->data;
+      priv_children = priv_children->next;
       
       if (GTK_WIDGET_VISIBLE (child->widget))
 	{
@@ -1558,32 +1776,32 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
 	  for (col = 0; col < child->left_attach; col++)
 	    {
 	      x += table->cols[col].allocation;
-	      x += table->cols[col].spacing;
+	      x += GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
 	    }
 	  
 	  for (col = child->left_attach; col < child->right_attach; col++)
 	    {
 	      max_width += table->cols[col].allocation;
 	      if ((col + 1) < child->right_attach)
-		max_width += table->cols[col].spacing;
+		max_width += GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
 	    }
 	  
 	  for (row = 0; row < child->top_attach; row++)
 	    {
 	      y += table->rows[row].allocation;
-	      y += table->rows[row].spacing;
+	      y += GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
 	    }
 	  
 	  for (row = child->top_attach; row < child->bottom_attach; row++)
 	    {
 	      max_height += table->rows[row].allocation;
 	      if ((row + 1) < child->bottom_attach)
-		max_height += table->rows[row].spacing;
+		max_height += GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
 	    }
 	  
 	  if (child->xfill)
 	    {
-	      allocation.width = MAX (1, max_width - (gint)child->xpadding * 2);
+	      allocation.width = MAX (1, max_width - GDK_UNIT_TO_PIXEL (priv_child->xpadding_unit) * 2);
 	      allocation.x = x + (max_width - allocation.width) / 2;
 	    }
 	  else
@@ -1594,7 +1812,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
 	  
 	  if (child->yfill)
 	    {
-	      allocation.height = MAX (1, max_height - (gint)child->ypadding * 2);
+	      allocation.height = MAX (1, max_height - GDK_UNIT_TO_PIXEL (priv_child->ypadding_unit) * 2);
 	      allocation.y = y + (max_height - allocation.height) / 2;
 	    }
 	  else
@@ -1612,5 +1830,42 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
     }
 }
 
+static void
+gtk_table_unit_changed (GtkWidget *widget)
+{
+  GtkTable *table = GTK_TABLE (widget);
+  GtkTablePrivate *priv = GTK_TABLE_GET_PRIVATE (table);
+  GtkTableChild *child;
+  GtkTableChildPrivate *priv_child;
+  GList *children;
+  GList *priv_children;
+  guint row, col;
+
+  table->column_spacing = GDK_UNIT_TO_PIXEL (priv->column_spacing_unit);
+  table->row_spacing = GDK_UNIT_TO_PIXEL (priv->row_spacing_unit);
+
+  children = table->children;
+  priv_children = priv->children;
+  while (children != NULL)
+    {
+      child = children->data;
+      children = children->next;
+      priv_child = priv_children->data;
+      priv_children = priv_children->next;
+
+      child->xpadding = GDK_UNIT_TO_PIXEL (priv_child->xpadding_unit);
+      child->ypadding = GDK_UNIT_TO_PIXEL (priv_child->ypadding_unit);
+    }
+
+  for (row = 0; row < table->nrows; row++)
+    table->rows[row].spacing = GDK_UNIT_TO_PIXEL (priv->rows[row].spacing_unit);
+  for (col = 0; col < table->ncols; col++)
+    table->cols[col].spacing = GDK_UNIT_TO_PIXEL (priv->cols[col].spacing_unit);
+
+  /* must chain up */
+  if (GTK_WIDGET_CLASS (gtk_table_parent_class)->unit_changed != NULL)
+    GTK_WIDGET_CLASS (gtk_table_parent_class)->unit_changed (widget);
+}
+
 #define __GTK_TABLE_C__
 #include "gtkaliasdef.c"
Index: gtk/gtkscale.c
===================================================================
--- gtk/gtkscale.c	(revision 21028)
+++ gtk/gtkscale.c	(working copy)
@@ -164,22 +164,18 @@ gtk_scale_class_init (GtkScaleClass *class)
 						      GTK_PARAM_READWRITE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("slider-length",
-							     P_("Slider Length"),
-							     P_("Length of scale's slider"),
-							     0,
-							     G_MAXINT,
-							     31,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("slider-length",
+                                                                P_("Slider Length"),
+                                                                P_("Length of scale's slider"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (31),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("value-spacing",
-							     P_("Value spacing"),
-							     P_("Space between value text and the slider/trough area"),
-							     0,
-							     G_MAXINT,
-							     2,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("value-spacing",
+                                                                P_("Value spacing"),
+                                                                P_("Space between value text and the slider/trough area"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                                GTK_PARAM_READABLE));
   
   /* All bindings (even arrow keys) are on both h/v scale, because
    * blind users etc. don't care about scale orientation.
@@ -567,14 +563,14 @@ static void
 gtk_scale_style_set (GtkWidget *widget,
                      GtkStyle  *previous)
 {
-  gint slider_length;
+  GdkUnit slider_length;
   GtkRange *range;
 
   range = GTK_RANGE (widget);
   
-  gtk_widget_style_get (widget,
-                        "slider-length", &slider_length,
-                        NULL);
+  gtk_widget_style_get_unit (widget,
+                             "slider-length", &slider_length,
+                             NULL);
   
   range->min_slider_size = slider_length;
   
Index: gtk/gtkbox.c
===================================================================
--- gtk/gtkbox.c	(revision 21028)
+++ gtk/gtkbox.c	(working copy)
@@ -45,6 +45,19 @@ enum {
   CHILD_PROP_POSITION
 };
 
+#define GTK_BOX_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_BOX, GtkBoxPrivate))
+
+typedef struct
+{
+  GdkUUnit padding_unit;
+} GtkBoxChildPrivate;
+
+struct _GtkBoxPrivate
+{
+  GdkUnit spacing_unit;
+  GList *children;
+};
+
 static void gtk_box_set_property (GObject         *object,
 				  guint            prop_id,
 				  const GValue    *value,
@@ -73,6 +86,7 @@ static void gtk_box_get_child_property (GtkContain
 					GParamSpec      *pspec);
 static GType gtk_box_child_type (GtkContainer   *container);
      
+static void gtk_box_unit_changed (GtkWidget *widget);
 
 G_DEFINE_ABSTRACT_TYPE (GtkBox, gtk_box, GTK_TYPE_CONTAINER)
 
@@ -80,11 +94,14 @@ static void
 gtk_box_class_init (GtkBoxClass *class)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (class);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
   GtkContainerClass *container_class = GTK_CONTAINER_CLASS (class);
 
   gobject_class->set_property = gtk_box_set_property;
   gobject_class->get_property = gtk_box_get_property;
    
+  widget_class->unit_changed = gtk_box_unit_changed;
+
   container_class->add = gtk_box_add;
   container_class->remove = gtk_box_remove;
   container_class->forall = gtk_box_forall;
@@ -94,13 +111,11 @@ gtk_box_class_init (GtkBoxClass *class)
 
   g_object_class_install_property (gobject_class,
                                    PROP_SPACING,
-                                   g_param_spec_int ("spacing",
-                                                     P_("Spacing"),
-                                                     P_("The amount of space between children"),
-                                                     0,
-                                                     G_MAXINT,
-                                                     0,
-                                                     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("spacing",
+                                                        P_("Spacing"),
+                                                        P_("The amount of space between children"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
   
   g_object_class_install_property (gobject_class,
                                    PROP_HOMOGENEOUS,
@@ -126,11 +141,11 @@ gtk_box_class_init (GtkBoxClass *class)
 								    GTK_PARAM_READWRITE));
   gtk_container_class_install_child_property (container_class,
 					      CHILD_PROP_PADDING,
-					      g_param_spec_uint ("padding", 
-								 P_("Padding"), 
-								 P_("Extra space to put between the child and its neighbors, in pixels"),
-								 0, G_MAXINT, 0,
-								 GTK_PARAM_READWRITE));
+					      gdk_param_spec_uunit ("padding", 
+                                                                    P_("Padding"), 
+                                                                    P_("Extra space to put between the child and its neighbors, in pixels"),
+                                                                    0,
+                                                                    GTK_PARAM_READWRITE));
   gtk_container_class_install_child_property (container_class,
 					      CHILD_PROP_PACK_TYPE,
 					      g_param_spec_enum ("pack-type", 
@@ -145,17 +160,24 @@ gtk_box_class_init (GtkBoxClass *class)
 								P_("The index of the child in the parent"),
 								-1, G_MAXINT, 0,
 								GTK_PARAM_READWRITE));
+
+  g_type_class_add_private (gobject_class, sizeof (GtkBoxPrivate));
 }
 
 static void
 gtk_box_init (GtkBox *box)
 {
+  GtkBoxPrivate *priv = GTK_BOX_GET_PRIVATE (box);
+
   GTK_WIDGET_SET_FLAGS (box, GTK_NO_WINDOW);
   gtk_widget_set_redraw_on_allocate (GTK_WIDGET (box), FALSE);
   
   box->children = NULL;
   box->spacing = 0;
   box->homogeneous = FALSE;
+
+  priv->spacing_unit = 0;
+  priv->children = NULL;
 }
 
 static void 
@@ -171,7 +193,7 @@ gtk_box_set_property (GObject         *object,
   switch (prop_id)
     {
     case PROP_SPACING:
-      gtk_box_set_spacing (box, g_value_get_int (value));
+      gtk_box_set_spacing (box, gdk_value_get_unit (value));
       break;
     case PROP_HOMOGENEOUS:
       gtk_box_set_homogeneous (box, g_value_get_boolean (value));
@@ -187,14 +209,13 @@ static void gtk_box_get_property (GObject
 				  GValue          *value,
 				  GParamSpec      *pspec)
 {
-  GtkBox *box;
+  GtkBox *box = GTK_BOX (object);
+  GtkBoxPrivate *priv = GTK_BOX_GET_PRIVATE (box);
 
-  box = GTK_BOX (object);
-
   switch (prop_id)
     {
     case PROP_SPACING:
-      g_value_set_int (value, box->spacing);
+      gdk_value_set_unit (value, priv->spacing_unit);
       break;
     case PROP_HOMOGENEOUS:
       g_value_set_boolean (value, box->homogeneous);
@@ -253,7 +274,7 @@ gtk_box_set_child_property (GtkContainer    *conta
 				 child,
 				 expand,
 				 fill,
-				 g_value_get_uint (value),
+				 gdk_value_get_uunit (value),
 				 pack_type);
       break;
     case CHILD_PROP_PACK_TYPE:
@@ -305,7 +326,7 @@ gtk_box_get_child_property (GtkContainer *containe
       g_value_set_boolean (value, fill);
       break;
     case CHILD_PROP_PADDING:
-      g_value_set_uint (value, padding);
+      gdk_value_set_uunit (value, padding);
       break;
     case CHILD_PROP_PACK_TYPE:
       g_value_set_enum (value, pack_type);
@@ -334,10 +355,12 @@ gtk_box_pack (GtkBox      *box,
               GtkWidget   *child,
               gboolean     expand,
               gboolean     fill,
-              guint        padding,
+              GdkUUnit     padding,
               GtkPackType  pack_type)
 {
+  GtkBoxPrivate *priv = GTK_BOX_GET_PRIVATE (box);
   GtkBoxChild *child_info;
+  GtkBoxChildPrivate *priv_child_info;
 
   g_return_if_fail (GTK_IS_BOX (box));
   g_return_if_fail (GTK_IS_WIDGET (child));
@@ -345,13 +368,17 @@ gtk_box_pack (GtkBox      *box,
 
   child_info = g_new (GtkBoxChild, 1);
   child_info->widget = child;
-  child_info->padding = padding;
+  child_info->padding = GDK_UNIT_TO_PIXEL (padding);
   child_info->expand = expand ? TRUE : FALSE;
   child_info->fill = fill ? TRUE : FALSE;
   child_info->pack = pack_type;
   child_info->is_secondary = FALSE;
 
+  priv_child_info = g_new (GtkBoxChildPrivate, 1);
+  priv_child_info->padding_unit = padding;
+
   box->children = g_list_append (box->children, child_info);
+  priv->children = g_list_append (priv->children, priv_child_info);
 
   gtk_widget_freeze_child_notify (child);
 
@@ -392,7 +419,7 @@ gtk_box_pack_start (GtkBox    *box,
 		    GtkWidget *child,
 		    gboolean   expand,
 		    gboolean   fill,
-		    guint      padding)
+		    GdkUUnit   padding)
 {
   gtk_box_pack (box, child, expand, fill, padding, GTK_PACK_START);
 }
@@ -424,7 +451,7 @@ gtk_box_pack_end (GtkBox    *box,
 		  GtkWidget *child,
 		  gboolean   expand,
 		  gboolean   fill,
-		  guint      padding)
+		  GdkUUnit   padding)
 {
   gtk_box_pack (box, child, expand, fill, padding, GTK_PACK_END);
 }
@@ -524,13 +551,18 @@ gtk_box_get_homogeneous (GtkBox *box)
  */
 void
 gtk_box_set_spacing (GtkBox *box,
-		     gint    spacing)
+		     GdkUnit spacing)
 {
+  GtkBoxPrivate *priv;
+
   g_return_if_fail (GTK_IS_BOX (box));
 
-  if (spacing != box->spacing)
+  priv = GTK_BOX_GET_PRIVATE (box);
+
+  if (spacing != priv->spacing_unit)
     {
-      box->spacing = spacing;
+      box->spacing = GDK_UNIT_TO_PIXEL (spacing);
+      priv->spacing_unit = spacing;
       g_object_notify (G_OBJECT (box), "spacing");
       gtk_widget_queue_resize (GTK_WIDGET (box));
     }
@@ -547,12 +579,38 @@ gtk_box_set_spacing (GtkBox *box,
 gint
 gtk_box_get_spacing (GtkBox *box)
 {
+  GtkBoxPrivate *priv;
+
   g_return_val_if_fail (GTK_IS_BOX (box), 0);
 
-  return box->spacing;
+  priv = GTK_BOX_GET_PRIVATE (box);
+
+  return GDK_UNIT_TO_PIXEL (priv->spacing_unit);
 }
 
 /**
+ * gtk_box_get_spacing_unit:
+ * @box: a #GtkBox
+ * 
+ * Like gtk_box_get_spacing() but preserves the unit.
+ * 
+ * Return value: spacing between children
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gtk_box_get_spacing_unit (GtkBox *box)
+{
+  GtkBoxPrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_BOX (box), 0);
+
+  priv = GTK_BOX_GET_PRIVATE (box);
+
+  return priv->spacing_unit;
+}
+
+/**
  * gtk_box_reorder_child:
  * @box: a #GtkBox
  * @child: the #GtkWidget to move
@@ -576,23 +634,32 @@ gtk_box_reorder_child (GtkBox    *box,
 		       GtkWidget *child,
 		       gint       position)
 {
+  GtkBoxPrivate *priv;
   GList *old_link;
   GList *new_link;
+  GList *priv_old_link;
+  GList *priv_new_link;
   GtkBoxChild *child_info = NULL;
+  GtkBoxChildPrivate *priv_child_info = NULL;
   gint old_position;
 
   g_return_if_fail (GTK_IS_BOX (box));
   g_return_if_fail (GTK_IS_WIDGET (child));
 
+  priv = GTK_BOX_GET_PRIVATE (box);
+
   old_link = box->children;
+  priv_old_link = priv->children;
   old_position = 0;
   while (old_link)
     {
       child_info = old_link->data;
+      priv_child_info = priv_old_link->data;
       if (child_info->widget == child)
 	break;
 
       old_link = old_link->next;
+      priv_old_link = priv_old_link->next;
       old_position++;
     }
 
@@ -602,13 +669,21 @@ gtk_box_reorder_child (GtkBox    *box,
     return;
 
   box->children = g_list_delete_link (box->children, old_link);
+  priv->children = g_list_delete_link (priv->children, priv_old_link);
 
   if (position < 0)
-    new_link = NULL;
+    {
+      new_link = NULL;
+      priv_new_link = NULL;
+    }
   else
-    new_link = g_list_nth (box->children, position);
+    {
+      new_link = g_list_nth (box->children, position);
+      priv_new_link = g_list_nth (priv->children, position);
+    }
 
   box->children = g_list_insert_before (box->children, new_link, child_info);
+  priv->children = g_list_insert_before (priv->children, priv_new_link, priv_child_info);
 
   gtk_widget_child_notify (child, "position");
   if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (box))
@@ -664,6 +739,64 @@ gtk_box_query_child_packing (GtkBox      *box,
 }
 
 /**
+ * gtk_box_query_child_packing_unit:
+ * @box: a #GtkBox
+ * @child: the #GtkWidget of the child to query
+ * @expand: pointer to return location for #GtkBox:expand child property 
+ * @fill: pointer to return location for #GtkBox:fill child property 
+ * @padding: pointer to return location for #GtkBox:padding child property 
+ * @pack_type: pointer to return location for #GtkBox:pack-type child property 
+ * 
+ * Like gtk_box_query_child_packing_unit() but preserves units.
+ *
+ * Since: 2.14
+ */
+void
+gtk_box_query_child_packing_unit (GtkBox      *box,
+                                  GtkWidget   *child,
+                                  gboolean    *expand,
+                                  gboolean    *fill,
+                                  GdkUUnit    *padding,
+                                  GtkPackType *pack_type)
+{
+  GList *list;
+  GList *priv_list;
+  GtkBoxChild *child_info = NULL;
+  GtkBoxChildPrivate *priv_child_info = NULL;
+  GtkBoxPrivate *priv;
+
+  g_return_if_fail (GTK_IS_BOX (box));
+  g_return_if_fail (GTK_IS_WIDGET (child));
+
+  priv = GTK_BOX_GET_PRIVATE (box);
+
+  list = box->children;
+  priv_list = priv->children;
+  while (list)
+    {
+      child_info = list->data;
+      priv_child_info = priv_list->data;
+      if (child_info->widget == child)
+	break;
+
+      list = list->next;
+      priv_list = priv_list->next;
+    }
+
+  if (list)
+    {
+      if (expand)
+	*expand = child_info->expand;
+      if (fill)
+	*fill = child_info->fill;
+      if (padding)
+	*padding = priv_child_info->padding_unit;
+      if (pack_type)
+	*pack_type = child_info->pack;
+    }
+}
+
+/**
  * gtk_box_set_child_packing:
  * @box: a #GtkBox
  * @child: the #GtkWidget of the child to set
@@ -679,23 +812,31 @@ gtk_box_set_child_packing (GtkBox      *box,
 			   GtkWidget   *child,
 			   gboolean     expand,
 			   gboolean     fill,
-			   guint        padding,
+			   GdkUUnit     padding,
 			   GtkPackType  pack_type)
 {
+  GtkBoxPrivate *priv;
   GList *list;
+  GList *priv_list;
   GtkBoxChild *child_info = NULL;
+  GtkBoxChildPrivate *priv_child_info = NULL;
 
   g_return_if_fail (GTK_IS_BOX (box));
   g_return_if_fail (GTK_IS_WIDGET (child));
 
+  priv = GTK_BOX_GET_PRIVATE (box);
+
   list = box->children;
+  priv_list = priv->children;
   while (list)
     {
       child_info = list->data;
+      priv_child_info = priv_list->data;
       if (child_info->widget == child)
 	break;
 
       list = list->next;
+      priv_list = priv_list->next;
     }
 
   gtk_widget_freeze_child_notify (child);
@@ -705,7 +846,8 @@ gtk_box_set_child_packing (GtkBox      *box,
       gtk_widget_child_notify (child, "expand");
       child_info->fill = fill != FALSE;
       gtk_widget_child_notify (child, "fill");
-      child_info->padding = padding;
+      child_info->padding = GDK_UNIT_TO_PIXEL (padding);
+      priv_child_info->padding_unit = padding;
       gtk_widget_child_notify (child, "padding");
       if (pack_type == GTK_PACK_END)
 	child_info->pack = GTK_PACK_END;
@@ -731,13 +873,18 @@ gtk_box_remove (GtkContainer *container,
 		GtkWidget    *widget)
 {
   GtkBox *box = GTK_BOX (container);
+  GtkBoxPrivate *priv = GTK_BOX_GET_PRIVATE (box);
   GtkBoxChild *child;
+  GtkBoxChildPrivate *priv_child;
   GList *children;
+  GList *priv_children;
 
   children = box->children;
+  priv_children = priv->children;
   while (children)
     {
       child = children->data;
+      priv_child = priv_children->data;
 
       if (child->widget == widget)
 	{
@@ -747,8 +894,11 @@ gtk_box_remove (GtkContainer *container,
 	  gtk_widget_unparent (widget);
 
 	  box->children = g_list_remove_link (box->children, children);
+	  priv->children = g_list_remove_link (priv->children, priv_children);
 	  g_list_free (children);
+	  g_list_free (priv_children);
 	  g_free (child);
+	  g_free (priv_child);
 
 	  /* queue resize regardless of GTK_WIDGET_VISIBLE (container),
 	   * since that's what is needed by toplevels.
@@ -760,6 +910,7 @@ gtk_box_remove (GtkContainer *container,
 	}
 
       children = children->next;
+      priv_children = priv_children->next;
     }
 }
 
@@ -794,5 +945,35 @@ gtk_box_forall (GtkContainer *container,
     }
 }
 
+static void
+gtk_box_unit_changed (GtkWidget *widget)
+{
+  GtkBox *box = GTK_BOX (widget);
+  GtkBoxPrivate *priv = GTK_BOX_GET_PRIVATE (box);
+  GtkBoxChild *child;
+  GtkBoxChildPrivate *priv_child;
+  GList *children;
+  GList *priv_children;
+
+  box->spacing = GDK_UNIT_TO_PIXEL (priv->spacing_unit);
+
+  children = box->children;
+  priv_children = priv->children;
+  while (children != NULL)
+    {
+      child = children->data;
+      priv_child = priv_children->data;
+
+      child->padding = GDK_UNIT_TO_PIXEL (priv_child->padding_unit);
+
+      children = children->next;
+      priv_children = priv_children->next;
+    }
+
+  /* must chain up */
+  if (GTK_WIDGET_CLASS (gtk_box_parent_class)->unit_changed != NULL)
+    GTK_WIDGET_CLASS (gtk_box_parent_class)->unit_changed (widget);
+}
+
 #define __GTK_BOX_C__
 #include "gtkaliasdef.c"
Index: gtk/gtkframe.c
===================================================================
--- gtk/gtkframe.c	(revision 21028)
+++ gtk/gtkframe.c	(working copy)
@@ -33,8 +33,8 @@
 #include "gtkbuildable.h"
 #include "gtkalias.h"
 
-#define LABEL_PAD 1
-#define LABEL_SIDE_PAD 2
+#define LABEL_PAD GDK_UNIT_ONE_TWELFTH_EM(1)
+#define LABEL_SIDE_PAD GDK_UNIT_ONE_TWELFTH_EM(2)
 
 enum {
   PROP_0,
@@ -560,7 +560,7 @@ gtk_frame_paint (GtkWidget    *widget,
 	  y -= height_extra;
 	  height += height_extra;
 	  
-	  x2 = widget->style->xthickness + (frame->child_allocation.width - child_requisition.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_SIDE_PAD;
+	  x2 = widget->style->xthickness + (frame->child_allocation.width - child_requisition.width - 2 * GDK_UNIT_TO_PIXEL (LABEL_PAD) - 2 * GDK_UNIT_TO_PIXEL (LABEL_SIDE_PAD)) * xalign + GDK_UNIT_TO_PIXEL (LABEL_SIDE_PAD);
 	  
 	  /* If the label is completely over or under the frame we can omit the gap */
 	  if (frame->label_yalign == 0.0 || frame->label_yalign == 1.0)
@@ -574,7 +574,7 @@ gtk_frame_paint (GtkWidget    *widget,
 				  area, widget, "frame",
 				  x, y, width, height,
 				  GTK_POS_TOP,
-				  x2, child_requisition.width + 2 * LABEL_PAD);
+				  x2, child_requisition.width + 2 * GDK_UNIT_TO_PIXEL (LABEL_PAD));
 	}
        else
 	 gtk_paint_shadow (widget->style, widget->window,
@@ -610,7 +610,7 @@ gtk_frame_size_request (GtkWidget      *widget,
     {
       gtk_widget_size_request (frame->label_widget, &child_requisition);
 
-      requisition->width = child_requisition.width + 2 * LABEL_PAD + 2 * LABEL_SIDE_PAD;
+      requisition->width = child_requisition.width + 2 * GDK_UNIT_TO_PIXEL (LABEL_PAD) + 2 * GDK_UNIT_TO_PIXEL (LABEL_SIDE_PAD);
       requisition->height =
 	MAX (0, child_requisition.height - widget->style->ythickness);
     }
@@ -674,9 +674,9 @@ gtk_frame_size_allocate (GtkWidget     *widget,
       else
 	xalign = 1 - frame->label_xalign;
       
-      child_allocation.x = frame->child_allocation.x + LABEL_SIDE_PAD +
-	(frame->child_allocation.width - child_requisition.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_PAD;
-      child_allocation.width = MIN (child_requisition.width, new_allocation.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD);
+      child_allocation.x = frame->child_allocation.x + GDK_UNIT_TO_PIXEL (LABEL_SIDE_PAD) +
+	(frame->child_allocation.width - child_requisition.width - 2 * GDK_UNIT_TO_PIXEL (LABEL_PAD) - 2 * GDK_UNIT_TO_PIXEL (LABEL_SIDE_PAD)) * xalign + GDK_UNIT_TO_PIXEL (LABEL_PAD);
+      child_allocation.width = MIN (child_requisition.width, new_allocation.width - 2 * GDK_UNIT_TO_PIXEL (LABEL_PAD) - 2 * GDK_UNIT_TO_PIXEL (LABEL_SIDE_PAD));
 
       child_allocation.y = frame->child_allocation.y - MAX (child_requisition.height, widget->style->ythickness);
       child_allocation.height = child_requisition.height;
Index: gtk/gtktable.h
===================================================================
--- gtk/gtktable.h	(revision 21028)
+++ gtk/gtktable.h	(working copy)
@@ -50,6 +50,7 @@ typedef struct _GtkTable	GtkTable;
 typedef struct _GtkTableClass	GtkTableClass;
 typedef struct _GtkTableChild	GtkTableChild;
 typedef struct _GtkTableRowCol	GtkTableRowCol;
+typedef struct _GtkTablePrivate GtkTablePrivate;
 
 struct _GtkTable
 {
@@ -115,8 +116,8 @@ void	   gtk_table_attach	      (GtkTable	       *t
 				       guint		bottom_attach,
 				       GtkAttachOptions xoptions,
 				       GtkAttachOptions yoptions,
-				       guint		xpadding,
-				       guint		ypadding);
+				       GdkUUnit		xpadding,
+				       GdkUUnit		ypadding);
 void	   gtk_table_attach_defaults  (GtkTable	       *table,
 				       GtkWidget       *widget,
 				       guint		left_attach,
@@ -125,20 +126,26 @@ void	   gtk_table_attach_defaults  (GtkTable
 				       guint		bottom_attach);
 void	   gtk_table_set_row_spacing  (GtkTable	       *table,
 				       guint		row,
-				       guint		spacing);
+				       GdkUUnit		spacing);
 guint      gtk_table_get_row_spacing  (GtkTable        *table,
 				       guint            row);
+GdkUUnit   gtk_table_get_row_spacing_unit  (GtkTable        *table,
+                                            guint            row);
 void	   gtk_table_set_col_spacing  (GtkTable	       *table,
 				       guint		column,
-				       guint		spacing);
+				       GdkUUnit		spacing);
 guint      gtk_table_get_col_spacing  (GtkTable        *table,
 				       guint            column);
+GdkUUnit   gtk_table_get_col_spacing_unit  (GtkTable        *table,
+                                            guint            column);
 void	   gtk_table_set_row_spacings (GtkTable	       *table,
-				       guint		spacing);
+				       GdkUUnit		spacing);
 guint      gtk_table_get_default_row_spacing (GtkTable        *table);
+GdkUUnit   gtk_table_get_default_row_spacing_unit (GtkTable        *table);
 void	   gtk_table_set_col_spacings (GtkTable	       *table,
-				       guint		spacing);
+				       GdkUUnit		spacing);
 guint      gtk_table_get_default_col_spacing (GtkTable        *table);
+GdkUUnit   gtk_table_get_default_col_spacing_unit (GtkTable        *table);
 void	   gtk_table_set_homogeneous  (GtkTable	       *table,
 				       gboolean		homogeneous);
 gboolean   gtk_table_get_homogeneous  (GtkTable        *table);
Index: gtk/gtkbox.h
===================================================================
--- gtk/gtkbox.h	(revision 21028)
+++ gtk/gtkbox.h	(working copy)
@@ -50,6 +50,7 @@ G_BEGIN_DECLS
 typedef struct _GtkBox	      GtkBox;
 typedef struct _GtkBoxClass   GtkBoxClass;
 typedef struct _GtkBoxChild   GtkBoxChild;
+typedef struct _GtkBoxPrivate GtkBoxPrivate;
 
 struct _GtkBox
 {
@@ -82,12 +83,12 @@ void	   gtk_box_pack_start	       (GtkBox	     *bo
 					GtkWidget    *child,
 					gboolean      expand,
 					gboolean      fill,
-					guint	      padding);
+					GdkUUnit      padding);
 void	   gtk_box_pack_end	       (GtkBox	     *box,
 					GtkWidget    *child,
 					gboolean      expand,
 					gboolean      fill,
-					guint	      padding);
+					GdkUUnit      padding);
 #ifndef GTK_DISABLE_DEPRECATED
 void	   gtk_box_pack_start_defaults (GtkBox	     *box,
 					GtkWidget    *widget);
@@ -98,8 +99,9 @@ void	   gtk_box_set_homogeneous     (GtkBox	     *
 					gboolean      homogeneous);
 gboolean   gtk_box_get_homogeneous     (GtkBox	     *box);
 void	   gtk_box_set_spacing	       (GtkBox	     *box,
-					gint	      spacing);
+					GdkUnit	      spacing);
 gint       gtk_box_get_spacing         (GtkBox       *box);
+GdkUnit    gtk_box_get_spacing_unit    (GtkBox       *box);
 void	   gtk_box_reorder_child       (GtkBox	     *box,
 					GtkWidget    *child,
 					gint	      position);
@@ -109,11 +111,17 @@ void	   gtk_box_query_child_packing (GtkBox	     *
 					gboolean     *fill,
 					guint	     *padding,
 					GtkPackType  *pack_type);
+void	   gtk_box_query_child_packing_unit (GtkBox	     *box,
+                                             GtkWidget    *child,
+                                             gboolean     *expand,
+                                             gboolean     *fill,
+                                             GdkUUnit     *padding,
+                                             GtkPackType  *pack_type);
 void	   gtk_box_set_child_packing   (GtkBox	     *box,
 					GtkWidget    *child,
 					gboolean      expand,
 					gboolean      fill,
-					guint	      padding,
+					GdkUUnit      padding,
 					GtkPackType   pack_type);
 
 
Index: gtk/gtkhsv.c
===================================================================
--- gtk/gtkhsv.c	(revision 21028)
+++ gtk/gtkhsv.c	(working copy)
@@ -41,10 +41,10 @@
  */
 
 /* Default width/height */
-#define DEFAULT_SIZE 100
+#define DEFAULT_SIZE GDK_UNIT_ONE_TWELFTH_EM(100)
 
 /* Default ring width */
-#define DEFAULT_RING_WIDTH 10
+#define DEFAULT_RING_WIDTH GDK_UNIT_ONE_TWELFTH_EM(10)
 
 
 /* Dragging modes */
@@ -62,8 +62,8 @@ typedef struct {
   double v;
   
   /* Size and ring width */
-  int size;
-  int ring_width;
+  GdkUnit size;
+  GdkUnit ring_width;
   
   /* Window for capturing events */
   GdkWindow *window;
@@ -348,8 +348,8 @@ gtk_hsv_size_request (GtkWidget      *widget,
 			"focus-padding", &focus_pad,
 			NULL);
   
-  requisition->width = priv->size + 2 * (focus_width + focus_pad);
-  requisition->height = priv->size + 2 * (focus_width + focus_pad);
+  requisition->width = GDK_UNIT_TO_PIXEL (priv->size) + 2 * (focus_width + focus_pad);
+  requisition->height = GDK_UNIT_TO_PIXEL (priv->size) + 2 * (focus_width + focus_pad);
 }
 
 /* Size_allocate handler for the HSV color selector */
@@ -544,8 +544,8 @@ compute_triangle (GtkHSV *hsv,
   priv = hsv->priv;
   
   center = GTK_WIDGET (hsv)->requisition.width / 2.0;
-  outer = priv->size / 2.0;
-  inner = outer - priv->ring_width;
+  outer = GDK_UNIT_TO_PIXEL (priv->size) / 2.0;
+  inner = outer - GDK_UNIT_TO_PIXEL (priv->ring_width);
   angle = priv->h * 2.0 * G_PI;
   
   *hx = floor (center + cos (angle) * inner + 0.5);
@@ -568,9 +568,9 @@ is_in_ring (GtkHSV *hsv,
   
   priv = hsv->priv;
   
-  center = priv->size / 2.0;
-  outer = priv->size / 2.0;
-  inner = outer - priv->ring_width;
+  center = GDK_UNIT_TO_PIXEL (priv->size) / 2.0;
+  outer = GDK_UNIT_TO_PIXEL (priv->size) / 2.0;
+  inner = outer - GDK_UNIT_TO_PIXEL (priv->ring_width);
   
   dx = x - center;
   dy = center - y;
@@ -910,8 +910,8 @@ paint_ring (GtkHSV      *hsv,
   
   center = widget->requisition.width / 2.0;
   
-  outer = priv->size / 2.0;
-  inner = outer - priv->ring_width;
+  outer = GDK_UNIT_TO_PIXEL (priv->size) / 2.0;
+  inner = outer - GDK_UNIT_TO_PIXEL (priv->ring_width);
   
   /* Create an image initialized with the ring colors */
   
@@ -985,11 +985,11 @@ paint_ring (GtkHSV      *hsv,
   cairo_set_source_surface (cr, source, x, y);
   cairo_surface_destroy (source);
 
-  cairo_set_line_width (cr, priv->ring_width);
+  cairo_set_line_width (cr, GDK_UNIT_TO_PIXEL (priv->ring_width));
   cairo_new_path (cr);
   cairo_arc (cr,
 	     center, center,
-	     priv->size / 2. - priv->ring_width / 2.,
+	     GDK_UNIT_TO_PIXEL (priv->size) / 2. - GDK_UNIT_TO_PIXEL (priv->ring_width) / 2.,
 	     0, 2 * G_PI);
   cairo_stroke (cr);
   
@@ -1437,8 +1437,8 @@ gtk_hsv_get_color (GtkHSV *hsv, double *h, double
  **/
 void
 gtk_hsv_set_metrics (GtkHSV *hsv,
-		     gint    size,
-		     gint    ring_width)
+		     GdkUnit size,
+		     GdkUnit ring_width)
 {
   HSVPrivate *priv;
   int same_size;
@@ -1446,7 +1446,7 @@ gtk_hsv_set_metrics (GtkHSV *hsv,
   g_return_if_fail (GTK_IS_HSV (hsv));
   g_return_if_fail (size > 0);
   g_return_if_fail (ring_width > 0);
-  g_return_if_fail (2 * ring_width + 1 <= size);
+  g_return_if_fail (2 * GDK_UNIT_TO_PIXEL (ring_width) + 1 <= GDK_UNIT_TO_PIXEL (size));
   
   priv = hsv->priv;
   
@@ -1481,6 +1481,34 @@ gtk_hsv_get_metrics (GtkHSV *hsv,
   priv = hsv->priv;
   
   if (size)
+    *size = GDK_UNIT_TO_PIXEL (priv->size);
+  
+  if (ring_width)
+    *ring_width = GDK_UNIT_TO_PIXEL (priv->ring_width);
+}
+
+/**
+ * gtk_hsv_get_metrics_unit:
+ * @hsv: An HSV color selector.
+ * @size: Return value for the diameter of the hue ring.
+ * @ring_width: Return value for the width of the hue ring.
+ *
+ * Like gtk_hsv_get_metrics() but preserves the unit.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_hsv_get_metrics_unit (GtkHSV  *hsv,
+                          GdkUnit *size,
+                          GdkUnit *ring_width)
+{
+  HSVPrivate *priv;
+  
+  g_return_if_fail (GTK_IS_HSV (hsv));
+  
+  priv = hsv->priv;
+  
+  if (size)
     *size = priv->size;
   
   if (ring_width)
Index: gtk/gtkhsv.h
===================================================================
--- gtk/gtkhsv.h	(revision 21028)
+++ gtk/gtkhsv.h	(working copy)
@@ -79,11 +79,14 @@ void       gtk_hsv_get_color    (GtkHSV    *hsv,
 				 gdouble   *s,
 				 gdouble   *v);
 void       gtk_hsv_set_metrics  (GtkHSV    *hsv,
-				 gint       size,
-				 gint       ring_width);
+				 GdkUnit    size,
+				 GdkUnit    ring_width);
 void       gtk_hsv_get_metrics  (GtkHSV    *hsv,
 				 gint      *size,
 				 gint      *ring_width);
+void       gtk_hsv_get_metrics_unit  (GtkHSV    *hsv,
+                                      GdkUnit   *size,
+                                      GdkUnit   *ring_width);
 gboolean   gtk_hsv_is_adjusting (GtkHSV    *hsv);
 void       gtk_hsv_to_rgb       (gdouble    h,
 				 gdouble    s,
Index: gtk/gtkbutton.c
===================================================================
--- gtk/gtkbutton.c	(revision 21028)
+++ gtk/gtkbutton.c	(working copy)
@@ -40,10 +40,33 @@
 #include "gtkintl.h"
 #include "gtkalias.h"
 
-static const GtkBorder default_default_border = { 1, 1, 1, 1 };
-static const GtkBorder default_default_outside_border = { 0, 0, 0, 0 };
-static const GtkBorder default_inner_border = { 1, 1, 1, 1 };
+static void
+set_default_default_border (GtkBorder *border)
+{
+  border->left   = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+  border->right  = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+  border->top    = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+  border->bottom = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+}
 
+static void
+set_default_default_outside_border (GtkBorder *border)
+{
+  border->left   = 0;
+  border->right  = 0;
+  border->top    = 0;
+  border->bottom = 0;
+}
+
+static void
+set_default_inner_border (GtkBorder *border)
+{
+  border->left   = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+  border->right  = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+  border->top    = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+  border->bottom = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (1));
+}
+
 /* Time out before giving up on getting a key release when animating
  * the close button.
  */
@@ -419,21 +442,17 @@ gtk_button_class_init (GtkButtonClass *klass)
 							       GTK_TYPE_BORDER,
 							       GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("child-displacement-x",
-							     P_("Child X Displacement"),
-							     P_("How far in the x direction to move the child when the button is depressed"),
-							     G_MININT,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("child-displacement-x",
+                                                                P_("Child X Displacement"),
+                                                                P_("How far in the x direction to move the child when the button is depressed"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("child-displacement-y",
-							     P_("Child Y Displacement"),
-							     P_("How far in the y direction to move the child when the button is depressed"),
-							     G_MININT,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("child-displacement-y",
+                                                                P_("Child Y Displacement"),
+                                                                P_("How far in the y direction to move the child when the button is depressed"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkButton:displace-focus:
@@ -472,13 +491,11 @@ gtk_button_class_init (GtkButtonClass *klass)
    * Since: 2.10
    */
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("image-spacing",
-							     P_("Image spacing"),
-							     P_("Spacing in pixels between the image and label"),
-							     0,
-							     G_MAXINT,
-							     2,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("image-spacing",
+                                                                P_("Image spacing"),
+                                                                P_("Spacing in pixels between the image and label"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkButton::gtk-button-images:
@@ -722,7 +739,7 @@ gtk_button_construct_child (GtkButton *button)
   GtkWidget *align;
   GtkWidget *image = NULL;
   gchar *label_text = NULL;
-  gint image_spacing;
+  GdkUnit image_spacing;
   
   if (!button->constructed)
     return;
@@ -730,9 +747,9 @@ gtk_button_construct_child (GtkButton *button)
   if (!button->label_text && !priv->image)
     return;
   
-  gtk_widget_style_get (GTK_WIDGET (button), 
-			"image-spacing", &image_spacing, 
-			NULL);
+  gtk_widget_style_get_unit (GTK_WIDGET (button), 
+                             "image-spacing", &image_spacing, 
+                             NULL);
 
   if (priv->image && !priv->image_is_stock)
     {
@@ -1030,9 +1047,9 @@ gtk_button_update_image_spacing (GtkButton *button
       child = GTK_BIN (child)->child;
       if (GTK_IS_BOX (child))
         {
-          gtk_widget_style_get (GTK_WIDGET (button),
-                                "image-spacing", &spacing,
-                                NULL);
+          gtk_widget_style_get_unit (GTK_WIDGET (button),
+                                     "image-spacing", &spacing,
+                                     NULL);
 
           gtk_box_set_spacing (GTK_BOX (child), spacing);
         }
@@ -1062,11 +1079,15 @@ gtk_button_get_props (GtkButton *button,
 
       if (tmp_border)
 	{
+          tmp_border->left = GDK_UNIT_TO_PIXEL (tmp_border->left);
+          tmp_border->right = GDK_UNIT_TO_PIXEL (tmp_border->right);
+          tmp_border->top = GDK_UNIT_TO_PIXEL (tmp_border->top);
+          tmp_border->bottom = GDK_UNIT_TO_PIXEL (tmp_border->bottom);
 	  *default_border = *tmp_border;
 	  gtk_border_free (tmp_border);
 	}
       else
-	*default_border = default_default_border;
+	set_default_default_border (default_border);
     }
 
   if (default_outside_border)
@@ -1075,11 +1096,15 @@ gtk_button_get_props (GtkButton *button,
 
       if (tmp_border)
 	{
+          tmp_border->left = GDK_UNIT_TO_PIXEL (tmp_border->left);
+          tmp_border->right = GDK_UNIT_TO_PIXEL (tmp_border->right);
+          tmp_border->top = GDK_UNIT_TO_PIXEL (tmp_border->top);
+          tmp_border->bottom = GDK_UNIT_TO_PIXEL (tmp_border->bottom);
 	  *default_outside_border = *tmp_border;
 	  gtk_border_free (tmp_border);
 	}
       else
-	*default_outside_border = default_default_outside_border;
+	set_default_default_outside_border (default_outside_border);
     }
 
   if (inner_border)
@@ -1088,11 +1113,15 @@ gtk_button_get_props (GtkButton *button,
 
       if (tmp_border)
 	{
+          tmp_border->left = GDK_UNIT_TO_PIXEL (tmp_border->left);
+          tmp_border->right = GDK_UNIT_TO_PIXEL (tmp_border->right);
+          tmp_border->top = GDK_UNIT_TO_PIXEL (tmp_border->top);
+          tmp_border->bottom = GDK_UNIT_TO_PIXEL (tmp_border->bottom);
 	  *inner_border = *tmp_border;
 	  gtk_border_free (tmp_border);
 	}
       else
-	*inner_border = default_inner_border;
+	set_default_inner_border (inner_border);
     }
 
   if (interior_focus)
Index: gtk/gtkvbbox.c
===================================================================
--- gtk/gtkvbbox.c	(revision 21028)
+++ gtk/gtkvbbox.c	(working copy)
@@ -35,9 +35,25 @@ static void gtk_vbutton_box_size_request  (GtkWidg
 static void gtk_vbutton_box_size_allocate (GtkWidget      *widget,
 					   GtkAllocation  *allocation);
 
-static gint default_spacing = 10;
+static gint override_default_spacing = -1;
+static gint get_default_spacing (void);
+static void set_default_spacing (gint size);
 static GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
 
+static gint
+get_default_spacing (void)
+{
+  if (override_default_spacing != -1)
+    return override_default_spacing;
+  return GDK_UNIT_ONE_TWELFTH_EM(30);
+}
+
+static void
+set_default_spacing (gint size)
+{
+  override_default_spacing = size;
+}
+
 G_DEFINE_TYPE (GtkVButtonBox, gtk_vbutton_box, GTK_TYPE_BUTTON_BOX)
 
 static void
@@ -74,7 +90,7 @@ gtk_vbutton_box_new (void)
 void
 gtk_vbutton_box_set_spacing_default (gint spacing)
 {
-  default_spacing = spacing;
+  set_default_spacing (spacing);
 }
 
 
@@ -94,7 +110,7 @@ gtk_vbutton_box_set_layout_default (GtkButtonBoxSt
 gint
 gtk_vbutton_box_get_spacing_default (void)
 {
-  return default_spacing;
+  return get_default_spacing ();
 }
 
 
Index: gtk/gtkpagesetupunixdialog.c
===================================================================
--- gtk/gtkpagesetupunixdialog.c	(revision 21028)
+++ gtk/gtkpagesetupunixdialog.c	(working copy)
@@ -976,7 +976,7 @@ create_radio_button (GSList      *group,
   image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_LARGE_TOOLBAR);
   gtk_stock_lookup (stock_id, &item);
   label = gtk_label_new (item.label);
-  hbox = gtk_hbox_new (0, 6);
+  hbox = gtk_hbox_new (0, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_container_add (GTK_CONTAINER (radio_button), hbox);
   gtk_container_add (GTK_CONTAINER (hbox), image);
   gtk_container_add (GTK_CONTAINER (hbox), label);
@@ -997,15 +997,15 @@ populate_dialog (GtkPageSetupUnixDialog *ps_dialog
   gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
 
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   table = gtk_table_new (5, 4, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 5);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
+  gtk_container_set_border_width (GTK_CONTAINER (table), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (dialog->vbox), table, TRUE, TRUE, 0);
   gtk_widget_show (table);
 
@@ -1326,12 +1326,12 @@ wrap_in_frame (const gchar *label,
   gtk_label_set_markup (GTK_LABEL (label_widget), bold_text);
   g_free (bold_text);
   
-  frame = gtk_vbox_new (FALSE, 6);
+  frame = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE, FALSE, 0);
   
   alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
   gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
-			     0, 0, 12, 0);
+			     0, 0, GDK_UNIT_ONE_TWELFTH_EM (12), 0);
   gtk_box_pack_start (GTK_BOX (frame), alignment, FALSE, FALSE, 0);
 
   gtk_container_add (GTK_CONTAINER (alignment), child);
@@ -1381,7 +1381,7 @@ new_unit_widget (CustomPaperDialog *dialog,
   data = g_new0 (UnitWidget, 1);
   data->display_unit = unit;
   
-  hbox = gtk_hbox_new (FALSE, 6);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
 
   button = gtk_spin_button_new_with_range (0.0, 9999.0, 1);
   if (unit == GTK_UNIT_INCH)
@@ -1850,17 +1850,17 @@ show_custom_paper_dialog (GtkPageSetupUnixDialog *
 		    G_CALLBACK (custom_paper_dialog_response_cb), data);
 
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
-  hbox = gtk_hbox_new (FALSE, 18);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, TRUE, TRUE, 0);
   gtk_widget_show (hbox);
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
   gtk_widget_show (vbox);
   
@@ -1876,7 +1876,7 @@ show_custom_paper_dialog (GtkPageSetupUnixDialog *
   treeview = gtk_tree_view_new_with_model (GTK_TREE_MODEL (priv->custom_paper_list));
   data->treeview = treeview;
   gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE);
-  gtk_widget_set_size_request (treeview, 140, -1);
+  gtk_widget_set_size_request (treeview, GDK_UNIT_ONE_TWELFTH_EM (140), -1);
   
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
   gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
@@ -1896,7 +1896,7 @@ show_custom_paper_dialog (GtkPageSetupUnixDialog *
   gtk_container_add (GTK_CONTAINER (scrolled), treeview);
   gtk_widget_show (treeview);
 
-  button_box = gtk_hbox_new (FALSE, 6);
+  button_box = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (vbox), button_box, FALSE, FALSE, 0);
   gtk_widget_show (button_box);
 
@@ -1920,15 +1920,15 @@ show_custom_paper_dialog (GtkPageSetupUnixDialog *
 
   user_units = get_default_user_units ();
   
-  vbox = gtk_vbox_new (FALSE, 18);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
   data->values_box = vbox;
   gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
   gtk_widget_show (vbox);
   
   table = gtk_table_new (2, 2, FALSE);
   
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
 
   label = gtk_label_new_with_mnemonic (_("_Width:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -1961,8 +1961,8 @@ show_custom_paper_dialog (GtkPageSetupUnixDialog *
   
 
   table = gtk_table_new (5, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
 
   label = gtk_label_new_with_mnemonic (_("_Top:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
Index: gtk/gtkpaned.c
===================================================================
--- gtk/gtkpaned.c	(revision 21028)
+++ gtk/gtkpaned.c	(working copy)
@@ -230,13 +230,11 @@ gtk_paned_class_init (GtkPanedClass *class)
 							 GTK_PARAM_READWRITE));
 				   
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("handle-size",
-							     P_("Handle Size"),
-							     P_("Width of handle"),
-							     0,
-							     G_MAXINT,
-							     5,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("handle-size",
+                                                                P_("Handle Size"),
+                                                                P_("Width of handle"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (5),
+                                                                GTK_PARAM_READABLE));
   /**
    * GtkPaned:min-position:
    *
Index: gtk/gtksettings.c
===================================================================
--- gtk/gtksettings.c	(revision 21028)
+++ gtk/gtksettings.c	(working copy)
@@ -1073,6 +1073,17 @@ gtk_settings_get_property (GObject     *object,
     default: ;
     }
 
+  if (property_id == PROP_FONT_NAME && g_getenv ("GTK_FONT_NAME") != 0)
+    {
+      g_value_set_string (value, g_getenv ("GTK_FONT_NAME"));
+      return;
+    }
+  else if (property_id == PROP_THEME_NAME && g_getenv ("NET_THEME_NAME") != 0)
+    {
+      g_value_set_string (value, g_getenv ("NET_THEME_NAME"));
+      return;
+    }
+
   /* For enums and strings, we need to get the value as a string,
    * not as an int, since we support using names/nicks as the setting
    * value.
@@ -2371,6 +2382,27 @@ get_color_scheme (GtkSettings *settings)
   return g_string_free (string, FALSE);
 }
 
+/* this function is here to ensure we only reset styles _once_ per
+ * unit change - see gtk_window_on_unit_changed() for more
+ * information.
+ */
+void
+_gtk_settings_reset_styles_for_unit_change (GtkSettings *settings)
+{
+  gint old_unit;
+  gint new_unit;
 
+  /* gah, this is fugly but we don't want to change the size of
+   * GtkSettings; alternatively have private data
+   */
+  old_unit = (gint) g_object_get_data (settings, "priv-gtk-settings-cur-unit");
+  new_unit = GDK_UNIT_TO_PIXEL (GDK_UNIT_EM (100));
+  if (old_unit != new_unit)
+    {
+      g_object_set_data (settings, "priv-gtk-settings-cur-unit", (gpointer) new_unit);
+      gtk_rc_reset_styles (settings);
+    }
+}
+
 #define __GTK_SETTINGS_C__
 #include "gtkaliasdef.c"
Index: gtk/gtksettings.h
===================================================================
--- gtk/gtksettings.h	(revision 21028)
+++ gtk/gtksettings.h	(working copy)
@@ -133,6 +133,7 @@ gboolean	    _gtk_settings_parse_convert       (Gt
 						       GParamSpec         *pspec,
 						       GValue	          *dest_value);
 
+void _gtk_settings_reset_styles_for_unit_change (GtkSettings *settings);
 
 G_END_DECLS
 
Index: gtk/gtkobject.c
===================================================================
--- gtk/gtkobject.c	(revision 21028)
+++ gtk/gtkobject.c	(working copy)
@@ -32,6 +32,7 @@
 
 #undef GTK_DISABLE_DEPRECATED
 
+#include <gobject/gvaluecollector.h>
 #include "gtkobject.h"
 #include "gtkintl.h"
 #include "gtkmarshalers.h"
@@ -776,5 +777,131 @@ gtk_object_unref (GtkObject *object)
   g_object_unref ((GObject*) object);
 }
 
+/*****************************************
+ * GtkObject unit-preserving getter
+ *
+ *****************************************/
+
+static inline void
+object_get_property (GObject     *object,
+		     GParamSpec  *pspec,
+		     GValue      *value)
+{
+  GObjectClass *class = g_type_class_peek (pspec->owner_type);
+  guint param_id = pspec->param_id;
+  GParamSpec *redirect;
+
+  redirect = g_param_spec_get_redirect_target (pspec);
+  if (redirect)
+    pspec = redirect;
+
+  class->get_property (object, param_id, value, pspec);
+}
+
+/**
+ * gtk_object_get_unit_valist:
+ * @object: a #GtkObject
+ * @first_property_name: name of the first property to get
+ * @var_args: return location for the first property, followed
+ * optionally by more name/return location pairs, followed by NULL
+ *
+ * Like g_object_get_valist() but preserves the unit for properties of
+ * type #GdkUnit and #GdkUUnit.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_object_get_unit_valist (GtkObject *object,
+                            const gchar *first_property_name,
+                            va_list	  var_args)
+{
+  const gchar *name;
+
+  g_return_if_fail (GTK_IS_OBJECT (object));
+
+  g_object_ref (object);
+
+  name = first_property_name;
+
+  while (name)
+    {
+      GValue value = { 0, };
+      GParamSpec *pspec;
+      gchar *error;
+
+      pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (object), name);
+      if (!pspec)
+	{
+	  g_warning ("%s: object class `%s' has no property named `%s'",
+		     G_STRFUNC,
+		     G_OBJECT_TYPE_NAME (object),
+		     name);
+	  break;
+	}
+      if (!(pspec->flags & G_PARAM_READABLE))
+	{
+	  g_warning ("%s: property `%s' of object class `%s' is not readable",
+		     G_STRFUNC,
+		     pspec->name,
+		     G_OBJECT_TYPE_NAME (object));
+	  break;
+	}
+
+      g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
+
+      /* this tells gdk_value_set_unit() and gdk_value_set_uunit() to
+       * avoid conversion when storing the data
+       */
+      if (GDK_IS_PARAM_SPEC_UNIT (pspec))
+        gdk_value_unit_skip_conversion (&value);
+      else if (GDK_IS_PARAM_SPEC_UUNIT (pspec))
+        gdk_value_uunit_skip_conversion (&value);
+
+      object_get_property (G_OBJECT (object), pspec, &value);
+
+      G_VALUE_LCOPY (&value, var_args, 0, &error);
+      if (error)
+	{
+	  g_warning ("%s: %s", G_STRFUNC, error);
+	  g_free (error);
+	  g_value_unset (&value);
+	  break;
+	}
+
+      g_value_unset (&value);
+
+      name = va_arg (var_args, gchar*);
+    }
+
+  g_object_unref (object);
+}
+
+/**
+ * gtk_object_get_unit:
+ * @object: a #GtkObject
+ * @first_property_name: name of the first property to get
+ * @...: return location for the first property, followed optionally
+ * by more name/return location pairs, followed by NULL
+ *
+ * Like g_object_get() but preserves the unit for properties of type
+ * #GdkUnit and #GdkUUnit.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_object_get_unit (gpointer object,
+                     const gchar *first_property_name,
+                     ...)
+{
+  GtkObject *_object = object;
+  va_list var_args;
+
+  g_return_if_fail (GTK_IS_OBJECT (_object));
+
+  va_start (var_args, first_property_name);
+  gtk_object_get_unit_valist (_object, first_property_name, var_args);
+  va_end (var_args);
+}
+
 #define __GTK_OBJECT_C__
 #include "gtkaliasdef.c"
Index: gtk/gtkobject.h
===================================================================
--- gtk/gtkobject.h	(revision 21028)
+++ gtk/gtkobject.h	(working copy)
@@ -226,6 +226,15 @@ void	gtk_object_add_arg_type		(const gchar	*arg_na
 
 #endif /* GTK_DISABLE_DEPRECATED */
 
+void
+gtk_object_get_unit_valist (GtkObject *object,
+                            const gchar *first_property_name,
+                            va_list	  var_args);
+
+void gtk_object_get_unit (gpointer object,
+                          const gchar *first_property_name,
+                          ...)  G_GNUC_NULL_TERMINATED;
+
 G_END_DECLS
 
 #endif /* __GTK_OBJECT_H__ */
Index: gtk/gtkfilesel.c
===================================================================
--- gtk/gtkfilesel.c	(revision 21028)
+++ gtk/gtkfilesel.c	(working copy)
@@ -97,10 +97,10 @@
 #include <sys/cygwin.h>		/* For cygwin_conv_to_posix_path */
 #endif
 
-#define DIR_LIST_WIDTH   180
-#define DIR_LIST_HEIGHT  180
-#define FILE_LIST_WIDTH  180
-#define FILE_LIST_HEIGHT 180
+#define DIR_LIST_WIDTH   GDK_UNIT_ONE_TWELFTH_EM(180)
+#define DIR_LIST_HEIGHT  GDK_UNIT_ONE_TWELFTH_EM(180)
+#define FILE_LIST_WIDTH  GDK_UNIT_ONE_TWELFTH_EM(180)
+#define FILE_LIST_HEIGHT GDK_UNIT_ONE_TWELFTH_EM(180)
 
 /* The Hurd doesn't define either PATH_MAX or MAXPATHLEN, so we put this
  * in here, since the rest of the code in the file does require some
@@ -638,7 +638,7 @@ gtk_file_selection_init (GtkFileSelection *filesel
 
   /* The dialog-sized vertical box  */
   filesel->main_vbox = dialog->vbox;
-  gtk_container_set_border_width (GTK_CONTAINER (filesel), 10);
+  gtk_container_set_border_width (GTK_CONTAINER (filesel), GDK_UNIT_ONE_TWELFTH_EM (10));
 
   /* The horizontal box containing create, rename etc. buttons */
   filesel->button_area = gtk_hbutton_box_new ();
@@ -651,7 +651,7 @@ gtk_file_selection_init (GtkFileSelection *filesel
   gtk_file_selection_show_fileop_buttons (filesel);
 
   /* hbox for pulldown menu */
-  pulldown_hbox = gtk_hbox_new (TRUE, 5);
+  pulldown_hbox = gtk_hbox_new (TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (filesel->main_vbox), pulldown_hbox, FALSE, FALSE, 0);
   gtk_widget_show (pulldown_hbox);
   
@@ -664,11 +664,11 @@ gtk_file_selection_init (GtkFileSelection *filesel
   /*  The horizontal box containing the directory and file listboxes  */
 
   spacer = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_size_request (spacer, -1, 5);
+  gtk_widget_set_size_request (spacer, -1, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (filesel->main_vbox), spacer, FALSE, FALSE, 0);
   gtk_widget_show (spacer);
   
-  list_hbox = gtk_hbox_new (FALSE, 5);
+  list_hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (filesel->main_vbox), list_hbox, TRUE, TRUE, 0);
   gtk_widget_show (list_hbox);
   if (WANT_HPANED)
@@ -681,7 +681,7 @@ gtk_file_selection_init (GtkFileSelection *filesel
     list_container = list_hbox;
 
   spacer = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_size_request (spacer, -1, 5);
+  gtk_widget_set_size_request (spacer, -1, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (filesel->main_vbox), spacer, FALSE, FALSE, 0);  
   gtk_widget_show (spacer);
   
@@ -782,8 +782,8 @@ gtk_file_selection_init (GtkFileSelection *filesel
   gtk_widget_grab_default (filesel->ok_button);
 
   /*  The selection entry widget  */
-  entry_vbox = gtk_vbox_new (FALSE, 2);
-  gtk_box_pack_end (GTK_BOX (filesel->main_vbox), entry_vbox, FALSE, FALSE, 2);
+  entry_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (2));
+  gtk_box_pack_end (GTK_BOX (filesel->main_vbox), entry_vbox, FALSE, FALSE, GDK_UNIT_ONE_TWELFTH_EM (2));
   gtk_widget_show (entry_vbox);
   
   eventbox = gtk_event_box_new ();
@@ -1399,21 +1399,21 @@ gtk_file_selection_create_dir (GtkWidget *widget,
       gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
 
   vbox = gtk_vbox_new (FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
 		     FALSE, FALSE, 0);
   gtk_widget_show( vbox);
   
   label = gtk_label_new_with_mnemonic (_("_Folder name:"));
   gtk_misc_set_alignment(GTK_MISC (label), 0.0, 0.0);
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_widget_show (label);
 
   /*  The directory entry widget  */
   fs->fileop_entry = gtk_entry_new ();
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), fs->fileop_entry);
   gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry, 
-		      TRUE, TRUE, 5);
+		      TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
   GTK_WIDGET_SET_FLAGS (fs->fileop_entry, GTK_CAN_DEFAULT);
   gtk_entry_set_activates_default (GTK_ENTRY (fs->fileop_entry), TRUE); 
   gtk_widget_show (fs->fileop_entry);
@@ -1659,7 +1659,7 @@ gtk_file_selection_rename_file (GtkWidget *widget,
     gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
   
   vbox = gtk_vbox_new (FALSE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), vbox,
 		      FALSE, FALSE, 0);
   gtk_widget_show(vbox);
@@ -1667,14 +1667,14 @@ gtk_file_selection_rename_file (GtkWidget *widget,
   buf = g_strdup_printf (_("Rename file \"%s\" to:"), fs->fileop_file);
   label = gtk_label_new (buf);
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
-  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 5);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_widget_show (label);
   g_free (buf);
 
   /* New filename entry */
   fs->fileop_entry = gtk_entry_new ();
   gtk_box_pack_start (GTK_BOX (vbox), fs->fileop_entry, 
-		      TRUE, TRUE, 5);
+		      TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
   GTK_WIDGET_SET_FLAGS (fs->fileop_entry, GTK_CAN_DEFAULT);
   gtk_entry_set_activates_default (GTK_ENTRY (fs->fileop_entry), TRUE); 
   gtk_widget_show (fs->fileop_entry);
Index: gtk/gtktearoffmenuitem.c
===================================================================
--- gtk/gtktearoffmenuitem.c	(revision 21028)
+++ gtk/gtktearoffmenuitem.c	(working copy)
@@ -31,9 +31,9 @@
 #include "gtkintl.h"
 #include "gtkalias.h"
 
-#define ARROW_SIZE 10
-#define TEAR_LENGTH 5
-#define BORDER_SPACING  3
+#define ARROW_SIZE GDK_UNIT_ONE_TWELFTH_EM(10)
+#define TEAR_LENGTH GDK_UNIT_ONE_TWELFTH_EM(5)
+#define BORDER_SPACING  GDK_UNIT_ONE_TWELFTH_EM(3)
 
 static void gtk_tearoff_menu_item_size_request (GtkWidget             *widget,
 				                GtkRequisition        *requisition);
@@ -79,13 +79,13 @@ gtk_tearoff_menu_item_size_request (GtkWidget
 {
   requisition->width = (GTK_CONTAINER (widget)->border_width +
 			widget->style->xthickness +
-			BORDER_SPACING) * 2;
+			GDK_UNIT_TO_PIXEL (BORDER_SPACING)) * 2;
   requisition->height = (GTK_CONTAINER (widget)->border_width +
 			 widget->style->ythickness) * 2;
 
   if (GTK_IS_MENU (widget->parent) && GTK_MENU (widget->parent)->torn_off)
     {
-      requisition->height += ARROW_SIZE;
+      requisition->height += GDK_UNIT_TO_PIXEL (ARROW_SIZE);
     }
   else
     {
@@ -143,29 +143,29 @@ gtk_tearoff_menu_item_paint (GtkWidget   *widget,
 	  else
 	    shadow_type = GTK_SHADOW_OUT;
 
-	  if (menu_item->toggle_size > ARROW_SIZE)
+	  if (menu_item->toggle_size > GDK_UNIT_TO_PIXEL (ARROW_SIZE))
 	    {
 	      if (direction == GTK_TEXT_DIR_LTR) {
-		arrow_x = x + (menu_item->toggle_size - ARROW_SIZE)/2;
+		arrow_x = x + (menu_item->toggle_size - GDK_UNIT_TO_PIXEL (ARROW_SIZE))/2;
 		arrow_type = GTK_ARROW_LEFT;
 	      }
 	      else {
-		arrow_x = x + width - menu_item->toggle_size + (menu_item->toggle_size - ARROW_SIZE)/2; 
+		arrow_x = x + width - menu_item->toggle_size + (menu_item->toggle_size - GDK_UNIT_TO_PIXEL (ARROW_SIZE))/2; 
 		arrow_type = GTK_ARROW_RIGHT;	    
 	      }
-	      x += menu_item->toggle_size + BORDER_SPACING;
+	      x += menu_item->toggle_size + GDK_UNIT_TO_PIXEL (BORDER_SPACING);
 	    }
 	  else
 	    {
 	      if (direction == GTK_TEXT_DIR_LTR) {
-		arrow_x = ARROW_SIZE / 2;
+		arrow_x = GDK_UNIT_TO_PIXEL (ARROW_SIZE) / 2;
 		arrow_type = GTK_ARROW_LEFT;
 	      }
 	      else {
-		arrow_x = x + width - 2 * ARROW_SIZE + ARROW_SIZE / 2; 
+		arrow_x = x + width - 2 * GDK_UNIT_TO_PIXEL (ARROW_SIZE) + GDK_UNIT_TO_PIXEL (ARROW_SIZE) / 2; 
 		arrow_type = GTK_ARROW_RIGHT;	    
 	      }
-	      x += 2 * ARROW_SIZE;
+	      x += 2 * GDK_UNIT_TO_PIXEL (ARROW_SIZE);
 	    }
 
 
@@ -174,7 +174,7 @@ gtk_tearoff_menu_item_paint (GtkWidget   *widget,
 			   NULL, widget, "tearoffmenuitem",
 			   arrow_type, FALSE,
 			   arrow_x, y + height / 2 - 5, 
-			   ARROW_SIZE, ARROW_SIZE);
+			   GDK_UNIT_TO_PIXEL (ARROW_SIZE), GDK_UNIT_TO_PIXEL (ARROW_SIZE));
 	}
 
       while (x < right_max)
@@ -183,17 +183,17 @@ gtk_tearoff_menu_item_paint (GtkWidget   *widget,
 
 	  if (direction == GTK_TEXT_DIR_LTR) {
 	    x1 = x;
-	    x2 = MIN (x + TEAR_LENGTH, right_max);
+	    x2 = MIN (x + GDK_UNIT_TO_PIXEL (TEAR_LENGTH), right_max);
 	  }
 	  else {
 	    x1 = right_max - x;
-	    x2 = MAX (right_max - x - TEAR_LENGTH, 0);
+	    x2 = MAX (right_max - x - GDK_UNIT_TO_PIXEL (TEAR_LENGTH), 0);
 	  }
 	  
 	  gtk_paint_hline (widget->style, widget->window, GTK_STATE_NORMAL,
 			   NULL, widget, "tearoffmenuitem",
 			   x1, x2, y + (height - widget->style->ythickness) / 2);
-	  x += 2 * TEAR_LENGTH;
+	  x += 2 * GDK_UNIT_TO_PIXEL (TEAR_LENGTH);
 	}
     }
 }
Index: gtk/gtkcolorseldialog.c
===================================================================
--- gtk/gtkcolorseldialog.c	(revision 21028)
+++ gtk/gtkcolorseldialog.c	(working copy)
@@ -132,13 +132,13 @@ gtk_color_selection_dialog_init (GtkColorSelection
   GtkDialog *dialog = GTK_DIALOG (colorseldiag);
 
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   colorseldiag->colorsel = gtk_color_selection_new ();
-  gtk_container_set_border_width (GTK_CONTAINER (colorseldiag->colorsel), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (colorseldiag->colorsel), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_color_selection_set_has_palette (GTK_COLOR_SELECTION(colorseldiag->colorsel), FALSE); 
   gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION(colorseldiag->colorsel), FALSE);
   gtk_container_add (GTK_CONTAINER (GTK_DIALOG (colorseldiag)->vbox), colorseldiag->colorsel);
Index: gtk/gtkprintunixdialog.c
===================================================================
--- gtk/gtkprintunixdialog.c	(revision 21028)
+++ gtk/gtkprintunixdialog.c	(working copy)
@@ -924,12 +924,12 @@ wrap_in_frame (const gchar *label,
   gtk_label_set_markup (GTK_LABEL (label_widget), bold_text);
   g_free (bold_text);
   
-  frame = gtk_vbox_new (FALSE, 6);
+  frame = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE, FALSE, 0);
   
   alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
   gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
-			     0, 0, 12, 0);
+			     0, 0, GDK_UNIT_ONE_TWELFTH_EM (12), 0);
   gtk_box_pack_start (GTK_BOX (frame), alignment, FALSE, FALSE, 0);
 
   gtk_container_add (GTK_CONTAINER (alignment), child);
@@ -973,7 +973,7 @@ add_option_to_extension_point (GtkPrinterOption *o
       gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
       gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
       
-      hbox = gtk_hbox_new (FALSE, 12);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
       gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
       gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
       gtk_widget_show (hbox);
@@ -1205,8 +1205,8 @@ update_dialog_from_settings (GtkPrintUnixDialog *d
 	continue;
 
       table = gtk_table_new (1, 2, FALSE);
-      gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-      gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+      gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+      gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
       
       gtk_printer_option_set_foreach_in_group (priv->options,
 					       group,
@@ -1678,11 +1678,11 @@ create_main_page (GtkPrintUnixDialog *dialog)
   GtkTreeSelection *selection;
   GtkWidget *custom_input;
 
-  main_vbox = gtk_vbox_new (FALSE, 18);
-  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
+  main_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
+  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_widget_show (main_vbox);
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (main_vbox), vbox, TRUE, TRUE, 0);
   gtk_widget_show (vbox);
 
@@ -1744,18 +1744,18 @@ create_main_page (GtkPrintUnixDialog *dialog)
   gtk_widget_show (treeview);
   gtk_container_add (GTK_CONTAINER (scrolled), treeview);
 
-  custom_input = gtk_hbox_new (FALSE, 18);
+  custom_input = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
   gtk_widget_show (custom_input);
   gtk_box_pack_start (GTK_BOX (vbox), custom_input, FALSE, FALSE, 0);
   priv->extension_point = custom_input;
 
-  hbox = gtk_hbox_new (FALSE, 18);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
   gtk_widget_show (hbox);
   gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
 
   table = gtk_table_new (3, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Range"), table);
   gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
   gtk_widget_show (table);
@@ -1794,8 +1794,8 @@ create_main_page (GtkPrintUnixDialog *dialog)
   update_range_sensitivity (radio, entry);
 
   table = gtk_table_new (3, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Copies"), table);
   gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
   gtk_widget_show (table);
@@ -1840,7 +1840,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
 
   priv->collate_image = image;
   gtk_widget_show (image);
-  gtk_widget_set_size_request (image, 70, 90);
+  gtk_widget_set_size_request (image, GDK_UNIT_ONE_TWELFTH_EM (70), GDK_UNIT_ONE_TWELFTH_EM (90));
   gtk_table_attach (GTK_TABLE (table), image,
 		    1, 2, 1, 3, GTK_FILL, 0,
 		    0, 0);
@@ -2239,17 +2239,17 @@ create_page_setup_page (GtkPrintUnixDialog *dialog
   GtkWidget *frame, *table, *widget;
   GtkWidget *combo, *spinbutton, *draw;
 
-  main_vbox = gtk_vbox_new (FALSE, 18);
-  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
+  main_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
+  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_widget_show (main_vbox);
 
-  hbox = gtk_hbox_new (FALSE, 18);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
   gtk_widget_show (hbox);
   gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
 
   table = gtk_table_new (5, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Layout"), table);
   gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
   gtk_widget_show (table);
@@ -2312,7 +2312,7 @@ create_page_setup_page (GtkPrintUnixDialog *dialog
 		    0, 1, 3, 4,  GTK_FILL, 0,
 		    0, 0);
 
-  hbox2 = gtk_hbox_new (FALSE, 6);
+  hbox2 = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_widget_show (hbox2);
   gtk_table_attach (GTK_TABLE (table), hbox2,
 		    1, 2, 3, 4,  GTK_FILL, 0,
@@ -2330,10 +2330,10 @@ create_page_setup_page (GtkPrintUnixDialog *dialog
   gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, FALSE, 0);
 
   table = gtk_table_new (4, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Paper"), table);
-  gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 6);
+  gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_widget_show (table);
 
   label = gtk_label_new_with_mnemonic (_("Paper _type:"));
@@ -2389,7 +2389,7 @@ create_page_setup_page (GtkPrintUnixDialog *dialog
   draw = gtk_drawing_area_new ();
   GTK_WIDGET_SET_FLAGS (draw, GTK_NO_WINDOW);
   priv->page_layout_preview = draw;
-  gtk_widget_set_size_request (draw, 200, 200);
+  gtk_widget_set_size_request (draw, GDK_UNIT_ONE_TWELFTH_EM (200), GDK_UNIT_ONE_TWELFTH_EM (200));
   g_signal_connect (draw, "expose-event", G_CALLBACK (draw_page_cb), dialog);
   gtk_widget_show (draw);
 
@@ -2411,13 +2411,13 @@ create_job_page (GtkPrintUnixDialog *dialog)
   GtkWidget *entry, *widget;
 
   main_table = gtk_table_new (2, 2, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (main_table), 12);
-  gtk_table_set_row_spacings (GTK_TABLE (main_table), 18);
-  gtk_table_set_col_spacings (GTK_TABLE (main_table), 18);
+  gtk_container_set_border_width (GTK_CONTAINER (main_table), GDK_UNIT_ONE_TWELFTH_EM (12));
+  gtk_table_set_row_spacings (GTK_TABLE (main_table), GDK_UNIT_ONE_TWELFTH_EM (18));
+  gtk_table_set_col_spacings (GTK_TABLE (main_table), GDK_UNIT_ONE_TWELFTH_EM (18));
 
   table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Job Details"), table);
   gtk_table_attach (GTK_TABLE (main_table), frame,
 		    0, 1, 0, 1,  GTK_FILL, 0,
@@ -2455,8 +2455,8 @@ create_job_page (GtkPrintUnixDialog *dialog)
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
 
   table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Print Document"), table);
   gtk_table_attach (GTK_TABLE (main_table), frame,
 		    0, 1, 1, 2,  GTK_FILL, 0,
@@ -2502,8 +2502,8 @@ create_job_page (GtkPrintUnixDialog *dialog)
 			    G_CALLBACK (update_print_at_option), dialog);
 
   table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   frame = wrap_in_frame (_("Add Cover Page"), table);
   gtk_table_attach (GTK_TABLE (main_table), frame,
 		    1, 2, 0, 1,  GTK_FILL, 0,
@@ -2563,9 +2563,9 @@ create_optional_page (GtkPrintUnixDialog  *dialog,
 				  GTK_POLICY_AUTOMATIC);
   
   table = gtk_table_new (1, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_container_set_border_width (GTK_CONTAINER (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
+  gtk_container_set_border_width (GTK_CONTAINER (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_widget_show (table);
 
   gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
@@ -2595,8 +2595,8 @@ create_advanced_page (GtkPrintUnixDialog *dialog)
 				  GTK_POLICY_NEVER,
 				  GTK_POLICY_AUTOMATIC);
 
-  main_vbox = gtk_vbox_new (FALSE, 18);
-  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 12);
+  main_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
+  gtk_container_set_border_width (GTK_CONTAINER (main_vbox), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_widget_show (main_vbox);
 
   gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolled),
@@ -2622,13 +2622,13 @@ populate_dialog (GtkPrintUnixDialog *print_dialog)
   GtkWidget *vbox, *conflict_hbox, *image, *label;
 
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
-  vbox = gtk_vbox_new (FALSE, 6);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (dialog->vbox), vbox, TRUE, TRUE, 0);
   gtk_widget_show (vbox);
 
@@ -2652,7 +2652,7 @@ populate_dialog (GtkPrintUnixDialog *print_dialog)
 			&priv->finishing_page);
   create_advanced_page (print_dialog);
 
-  priv->conflicts_widget = conflict_hbox = gtk_hbox_new (FALSE, 12);
+  priv->conflicts_widget = conflict_hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_end (GTK_BOX (vbox), conflict_hbox, FALSE, FALSE, 0);
   image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU);
   gtk_widget_show (image);
Index: gtk/gtkfontsel.c
===================================================================
--- gtk/gtkfontsel.c	(revision 21028)
+++ gtk/gtkfontsel.c	(working copy)
@@ -78,14 +78,14 @@
 
 /* This is the initial and maximum height of the preview entry (it expands
    when large font sizes are selected). Initial height is also the minimum. */
-#define INITIAL_PREVIEW_HEIGHT 44
-#define MAX_PREVIEW_HEIGHT 300
+#define INITIAL_PREVIEW_HEIGHT GDK_UNIT_ONE_TWELFTH_EM(44)
+#define MAX_PREVIEW_HEIGHT GDK_UNIT_ONE_TWELFTH_EM(300)
 
 /* These are the sizes of the font, style & size lists. */
-#define FONT_LIST_HEIGHT	136
-#define FONT_LIST_WIDTH		190
-#define FONT_STYLE_LIST_WIDTH	170
-#define FONT_SIZE_LIST_WIDTH	60
+#define FONT_LIST_HEIGHT	GDK_UNIT_ONE_TWELFTH_EM(136)
+#define FONT_LIST_WIDTH		GDK_UNIT_ONE_TWELFTH_EM(190)
+#define FONT_STYLE_LIST_WIDTH	GDK_UNIT_ONE_TWELFTH_EM(170)
+#define FONT_SIZE_LIST_WIDTH	GDK_UNIT_ONE_TWELFTH_EM(60)
 
 /* These are what we use as the standard font sizes, for the size list.
  */
@@ -287,34 +287,34 @@ gtk_font_selection_init (GtkFontSelection *fontsel
 
   gtk_widget_push_composite_child ();
 
-  gtk_box_set_spacing (GTK_BOX (fontsel), 12);
+  gtk_box_set_spacing (GTK_BOX (fontsel), GDK_UNIT_ONE_TWELFTH_EM (12));
   fontsel->size = 12 * PANGO_SCALE;
   
   /* Create the table of font, style & size. */
   table = gtk_table_new (3, 3, FALSE);
   gtk_widget_show (table);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_start (GTK_BOX (fontsel), table, TRUE, TRUE, 0);
 
 #ifdef INCLUDE_FONT_ENTRIES
   fontsel->font_entry = gtk_entry_new ();
   gtk_editable_set_editable (GTK_EDITABLE (fontsel->font_entry), FALSE);
-  gtk_widget_set_size_request (fontsel->font_entry, 20, -1);
+  gtk_widget_set_size_request (fontsel->font_entry, GDK_UNIT_ONE_TWELFTH_EM (20), -1);
   gtk_widget_show (fontsel->font_entry);
   gtk_table_attach (GTK_TABLE (table), fontsel->font_entry, 0, 1, 1, 2,
 		    GTK_FILL, 0, 0, 0);
   
   fontsel->font_style_entry = gtk_entry_new ();
   gtk_editable_set_editable (GTK_EDITABLE (fontsel->font_style_entry), FALSE);
-  gtk_widget_set_size_request (fontsel->font_style_entry, 20, -1);
+  gtk_widget_set_size_request (fontsel->font_style_entry, GDK_UNIT_ONE_TWELFTH_EM (20), -1);
   gtk_widget_show (fontsel->font_style_entry);
   gtk_table_attach (GTK_TABLE (table), fontsel->font_style_entry, 1, 2, 1, 2,
 		    GTK_FILL, 0, 0, 0);
 #endif /* INCLUDE_FONT_ENTRIES */
   
   fontsel->size_entry = gtk_entry_new ();
-  gtk_widget_set_size_request (fontsel->size_entry, 20, -1);
+  gtk_widget_set_size_request (fontsel->size_entry, GDK_UNIT_ONE_TWELFTH_EM (20), -1);
   gtk_widget_show (fontsel->size_entry);
   gtk_table_attach (GTK_TABLE (table), fontsel->size_entry, 2, 3, 1, 2,
 		    GTK_FILL, 0, 0, 0);
@@ -509,7 +509,7 @@ gtk_font_selection_init (GtkFontSelection *fontsel
     }    
       
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_widget_show (vbox);
   gtk_box_pack_start (GTK_BOX (fontsel), vbox, FALSE, TRUE, 0);
   
@@ -1092,7 +1092,8 @@ gtk_font_selection_update_preview (GtkFontSelectio
   gtk_widget_size_request (preview_entry, NULL);
   
   /* We don't ever want to be over MAX_PREVIEW_HEIGHT pixels high. */
-  new_height = CLAMP (preview_entry->requisition.height, INITIAL_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT);
+  new_height = CLAMP (preview_entry->requisition.height,
+                      GDK_UNIT_TO_PIXEL (INITIAL_PREVIEW_HEIGHT), GDK_UNIT_TO_PIXEL (MAX_PREVIEW_HEIGHT));
 
   if (new_height > old_requisition.height || new_height < old_requisition.height - 30)
     gtk_widget_set_size_request (preview_entry, -1, new_height);
@@ -1536,10 +1537,10 @@ gtk_font_selection_dialog_init (GtkFontSelectionDi
   GtkDialog *dialog = GTK_DIALOG (fontseldiag);
   
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   gtk_widget_push_composite_child ();
 
@@ -1548,7 +1549,7 @@ gtk_font_selection_dialog_init (GtkFontSelectionDi
   fontseldiag->main_vbox = dialog->vbox;
   
   fontseldiag->fontsel = gtk_font_selection_new ();
-  gtk_container_set_border_width (GTK_CONTAINER (fontseldiag->fontsel), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (fontseldiag->fontsel), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_widget_show (fontseldiag->fontsel);
   gtk_box_pack_start (GTK_BOX (fontseldiag->main_vbox),
 		      fontseldiag->fontsel, TRUE, TRUE, 0);
Index: gtk/gtkcellrenderer.c
===================================================================
--- gtk/gtkcellrenderer.c	(revision 21028)
+++ gtk/gtkcellrenderer.c	(working copy)
@@ -43,6 +43,8 @@ typedef struct _GtkCellRendererPrivate GtkCellRend
 struct _GtkCellRendererPrivate
 {
   GdkColor cell_background;
+  GdkUUnit xpad_unit;
+  GdkUUnit ypad_unit;
 };
 
 
@@ -79,6 +81,8 @@ G_DEFINE_ABSTRACT_TYPE (GtkCellRenderer, gtk_cell_
 static void
 gtk_cell_renderer_init (GtkCellRenderer *cell)
 {
+  GtkCellRendererPrivate *priv = GTK_CELL_RENDERER_GET_PRIVATE (cell);
+
   cell->mode = GTK_CELL_RENDERER_MODE_INERT;
   cell->visible = TRUE;
   cell->width = -1;
@@ -87,6 +91,8 @@ gtk_cell_renderer_init (GtkCellRenderer *cell)
   cell->yalign = 0.5;
   cell->xpad = 0;
   cell->ypad = 0;
+  priv->xpad_unit = 0;
+  priv->ypad_unit = 0;
   cell->sensitive = TRUE;
   cell->is_expander = FALSE;
   cell->is_expanded = FALSE;
@@ -217,43 +223,35 @@ gtk_cell_renderer_class_init (GtkCellRendererClass
 
   g_object_class_install_property (object_class,
 				   PROP_XPAD,
-				   g_param_spec_uint ("xpad",
-						      P_("xpad"),
-						      P_("The xpad"),
-						      0,
-						      G_MAXUINT,
-						      0,
-						      GTK_PARAM_READWRITE));
+				   gdk_param_spec_uunit ("xpad",
+                                                         P_("xpad"),
+                                                         P_("The xpad"),
+                                                         0,
+                                                         GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
 				   PROP_YPAD,
-				   g_param_spec_uint ("ypad",
-						      P_("ypad"),
-						      P_("The ypad"),
-						      0,
-						      G_MAXUINT,
-						      0,
-						      GTK_PARAM_READWRITE));
+				   gdk_param_spec_uunit ("ypad",
+                                                         P_("ypad"),
+                                                         P_("The ypad"),
+                                                         0,
+                                                         GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
 				   PROP_WIDTH,
-				   g_param_spec_int ("width",
-						     P_("width"),
-						     P_("The fixed width"),
-						     -1,
-						     G_MAXINT,
-						     -1,
-						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("width",
+                                                        P_("width"),
+                                                        P_("The fixed width"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
 				   PROP_HEIGHT,
-				   g_param_spec_int ("height",
-						     P_("height"),
-						     P_("The fixed height"),
-						     -1,
-						     G_MAXINT,
-						     -1,
-						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("height",
+                                                        P_("height"),
+                                                        P_("The fixed height"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (object_class,
 				   PROP_IS_EXPANDER,
@@ -336,16 +334,16 @@ gtk_cell_renderer_get_property (GObject     *objec
       g_value_set_float (value, cell->yalign);
       break;
     case PROP_XPAD:
-      g_value_set_uint (value, cell->xpad);
+      gdk_value_set_uunit (value, priv->xpad_unit);
       break;
     case PROP_YPAD:
-      g_value_set_uint (value, cell->ypad);
+      gdk_value_set_uunit (value, priv->ypad_unit);
       break;
     case PROP_WIDTH:
-      g_value_set_int (value, cell->width);
+      gdk_value_set_unit (value, cell->width);
       break;
     case PROP_HEIGHT:
-      g_value_set_int (value, cell->height);
+      gdk_value_set_unit (value, cell->height);
       break;
     case PROP_IS_EXPANDER:
       g_value_set_boolean (value, cell->is_expander);
@@ -382,6 +380,7 @@ gtk_cell_renderer_set_property (GObject      *obje
 				GParamSpec   *pspec)
 {
   GtkCellRenderer *cell = GTK_CELL_RENDERER (object);
+  GtkCellRendererPrivate *priv = GTK_CELL_RENDERER_GET_PRIVATE (object);
 
   switch (param_id)
     {
@@ -404,16 +403,18 @@ gtk_cell_renderer_set_property (GObject      *obje
       cell->yalign = g_value_get_float (value);
       break;
     case PROP_XPAD:
-      cell->xpad = g_value_get_uint (value);
+      priv->xpad_unit = gdk_value_get_uunit (value);
+      cell->xpad = GDK_UNIT_TO_PIXEL (priv->xpad_unit);
       break;
     case PROP_YPAD:
-      cell->ypad = g_value_get_uint (value);
+      priv->ypad_unit = gdk_value_get_uunit (value);
+      cell->ypad = GDK_UNIT_TO_PIXEL (priv->ypad_unit);
       break;
     case PROP_WIDTH:
-      cell->width = g_value_get_int (value);
+      cell->width = gdk_value_get_unit (value);
       break;
     case PROP_HEIGHT:
-      cell->height = g_value_get_int (value);
+      cell->height = gdk_value_get_unit (value);
       break;
     case PROP_IS_EXPANDER:
       cell->is_expander = g_value_get_boolean (value);
@@ -511,6 +512,59 @@ gtk_cell_renderer_get_size (GtkCellRenderer    *ce
   if (width && cell->width != -1)
     {
       real_width = NULL;
+      *width = GDK_UNIT_TO_PIXEL (cell->width);
+    }
+  if (height && cell->height != -1)
+    {
+      real_height = NULL;
+      *height = GDK_UNIT_TO_PIXEL (cell->height);
+    }
+
+  GTK_CELL_RENDERER_GET_CLASS (cell)->get_size (cell,
+						widget,
+						(GdkRectangle *) cell_area,
+						x_offset,
+						y_offset,
+						real_width,
+						real_height);
+  if (real_width)
+    *real_width = GDK_UNIT_TO_PIXEL (*real_width);
+  if (real_height)
+    *real_height = GDK_UNIT_TO_PIXEL (*real_height);
+}
+
+/**
+ * gtk_cell_renderer_get_size_unit:
+ * @cell: a #GtkCellRenderer
+ * @widget: the widget the renderer is rendering to
+ * @cell_area: The area a cell will be allocated, or %NULL
+ * @x_offset: location to return x offset of cell relative to @cell_area, or %NULL
+ * @y_offset: location to return y offset of cell relative to @cell_area, or %NULL
+ * @width: location to return width needed to render a cell, or %NULL
+ * @height: location to return height needed to render a cell, or %NULL
+ *
+ * Like gtk_cell_renderer_get_size() but preserves the units.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_cell_renderer_get_size_unit (GtkCellRenderer    *cell,
+                                 GtkWidget          *widget,
+                                 const GdkRectangle *cell_area,
+                                 gint               *x_offset,
+                                 gint               *y_offset,
+                                 GdkUnit            *width,
+                                 GdkUnit            *height)
+{
+  gint *real_width = width;
+  gint *real_height = height;
+
+  g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
+  g_return_if_fail (GTK_CELL_RENDERER_GET_CLASS (cell)->get_size != NULL);
+
+  if (width && cell->width != -1)
+    {
+      real_width = NULL;
       *width = cell->width;
     }
   if (height && cell->height != -1)
@@ -689,8 +743,8 @@ gtk_cell_renderer_start_editing (GtkCellRenderer
  **/
 void
 gtk_cell_renderer_set_fixed_size (GtkCellRenderer *cell,
-				  gint             width,
-				  gint             height)
+				  GdkUnit          width,
+				  GdkUnit          height)
 {
   g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
   g_return_if_fail (width >= -1 && height >= -1);
@@ -731,6 +785,29 @@ gtk_cell_renderer_get_fixed_size (GtkCellRenderer
   g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
 
   if (width)
+    (* width) = GDK_UNIT_TO_PIXEL (cell->width);
+  if (height)
+    (* height) = GDK_UNIT_TO_PIXEL (cell->height);
+}
+
+/**
+ * gtk_cell_renderer_get_fixed_size_unit:
+ * @cell: A #GtkCellRenderer
+ * @width: location to fill in with the fixed width of the widget, or %NULL
+ * @height: location to fill in with the fixed height of the widget, or %NULL
+ * 
+ * Like gtk_cell_renderer_get_fixed_size_unit() but preserves the unit information.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_cell_renderer_get_fixed_size_unit (GtkCellRenderer *cell,
+                                       GdkUnit         *width,
+                                       GdkUnit         *height)
+{
+  g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
+
+  if (width)
     (* width) = cell->width;
   if (height)
     (* height) = cell->height;
Index: gtk/gtkcellrenderer.h
===================================================================
--- gtk/gtkcellrenderer.h	(revision 21028)
+++ gtk/gtkcellrenderer.h	(working copy)
@@ -62,8 +62,8 @@ struct _GtkCellRenderer
   gfloat GSEAL (xalign);
   gfloat GSEAL (yalign);
 
-  gint GSEAL (width);
-  gint GSEAL (height);
+  GdkUnit GSEAL (width);
+  GdkUnit GSEAL (height);
 
   guint16 GSEAL (xpad);
   guint16 GSEAL (ypad);
@@ -87,8 +87,8 @@ struct _GtkCellRendererClass
 				      GdkRectangle         *cell_area,
 				      gint                 *x_offset,
 				      gint                 *y_offset,
-				      gint                 *width,
-				      gint                 *height);
+				      GdkUnit              *width,
+				      GdkUnit              *height);
   void             (* render)        (GtkCellRenderer      *cell,
 				      GdkDrawable          *window,
 				      GtkWidget            *widget,
@@ -131,6 +131,13 @@ void             gtk_cell_renderer_get_size
 						   gint                 *y_offset,
 						   gint                 *width,
 						   gint                 *height);
+void             gtk_cell_renderer_get_size_unit  (GtkCellRenderer      *cell,
+						   GtkWidget            *widget,
+						   const GdkRectangle   *cell_area,
+						   gint                 *x_offset,
+						   gint                 *y_offset,
+						   GdkUnit              *width,
+						   GdkUnit              *height);
 void             gtk_cell_renderer_render         (GtkCellRenderer      *cell,
 						   GdkWindow            *window,
 						   GtkWidget            *widget,
@@ -153,11 +160,14 @@ GtkCellEditable *gtk_cell_renderer_start_editing
 						   const GdkRectangle   *cell_area,
 						   GtkCellRendererState  flags);
 void             gtk_cell_renderer_set_fixed_size (GtkCellRenderer      *cell,
-						   gint                  width,
-						   gint                  height);
+						   GdkUnit               width,
+						   GdkUnit               height);
 void             gtk_cell_renderer_get_fixed_size (GtkCellRenderer      *cell,
 						   gint                 *width,
 						   gint                 *height);
+void             gtk_cell_renderer_get_fixed_size_unit (GtkCellRenderer *cell,
+                                                        GdkUnit         *width,
+                                                        GdkUnit         *height);
 
 /* For use by cell renderer implementations only */
 #ifndef GTK_DISABLE_DEPRECATED
Index: gtk/gtkimage.c
===================================================================
--- gtk/gtkimage.c	(revision 21028)
+++ gtk/gtkimage.c	(working copy)
@@ -44,7 +44,7 @@ struct _GtkImagePrivate
   /* Only used with GTK_IMAGE_ANIMATION, GTK_IMAGE_PIXBUF */
   gchar *filename;
 
-  gint pixel_size;
+  GdkUnit pixel_size;
 };
 
 #define GTK_IMAGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_IMAGE, GtkImagePrivate))
@@ -201,12 +201,11 @@ gtk_image_class_init (GtkImageClass *class)
    */
   g_object_class_install_property (gobject_class,
 				   PROP_PIXEL_SIZE,
-				   g_param_spec_int ("pixel-size",
-						     P_("Pixel size"),
-						     P_("Pixel size to use for named icon"),
-						     -1, G_MAXINT,
-						     -1,
-						     GTK_PARAM_READWRITE));
+				   gdk_param_spec_unit ("pixel-size",
+                                                        P_("Pixel size"),
+                                                        P_("Pixel size to use for named icon"),
+                                                        -1,
+                                                        GTK_PARAM_READWRITE));
   
   g_object_class_install_property (gobject_class,
                                    PROP_PIXBUF_ANIMATION,
@@ -365,7 +364,7 @@ gtk_image_set_property (GObject      *object,
         image->icon_size = g_value_get_int (value);
       break;
     case PROP_PIXEL_SIZE:
-      gtk_image_set_pixel_size (image, g_value_get_int (value));
+      gtk_image_set_pixel_size (image, gdk_value_get_unit (value));
       break;
     case PROP_PIXBUF_ANIMATION:
       gtk_image_set_from_animation (image,
@@ -451,7 +450,7 @@ gtk_image_get_property (GObject     *object,
       g_value_set_int (value, image->icon_size);
       break;
     case PROP_PIXEL_SIZE:
-      g_value_set_int (value, priv->pixel_size);
+      gdk_value_set_unit (value, priv->pixel_size);
       break;
     case PROP_PIXBUF_ANIMATION:
       if (image->storage_type != GTK_IMAGE_ANIMATION)
@@ -1542,7 +1541,7 @@ ensure_pixbuf_for_icon_name (GtkImage *image)
     {
       if (priv->pixel_size != -1)
 	{
-	  width = height = priv->pixel_size;
+	  width = height = GDK_UNIT_TO_PIXEL (priv->pixel_size);
           flags |= GTK_ICON_LOOKUP_FORCE_SIZE;
 	}
       else if (!gtk_icon_size_lookup_for_settings (settings,
@@ -1626,7 +1625,7 @@ ensure_pixbuf_for_gicon (GtkImage *image)
     {
       if (priv->pixel_size != -1)
 	{
-	  width = height = priv->pixel_size;
+	  width = height = GDK_UNIT_TO_PIXEL (priv->pixel_size);
           flags |= GTK_ICON_LOOKUP_FORCE_SIZE;
 	}
       else if (!gtk_icon_size_lookup_for_settings (settings,
@@ -2332,6 +2331,28 @@ gtk_image_get_pixel_size (GtkImage *image)
   
   priv = GTK_IMAGE_GET_PRIVATE (image);
 
+  return GDK_UNIT_TO_PIXEL (priv->pixel_size);
+}
+
+/**
+ * gtk_image_get_pixel_size_unit:
+ * @image: a #GtkImage
+ * 
+ * Like gtk_image_get_pixel_size() but preserves the unit.
+ *
+ * Returns: the pixel size used for named icons.
+ *
+ * Since: 2.14
+ */
+GdkUnit
+gtk_image_get_pixel_size_unit (GtkImage *image)
+{
+  GtkImagePrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_IMAGE (image), -1);
+  
+  priv = GTK_IMAGE_GET_PRIVATE (image);
+
   return priv->pixel_size;
 }
 
Index: gtk/gtkimage.h
===================================================================
--- gtk/gtkimage.h	(revision 21028)
+++ gtk/gtkimage.h	(working copy)
@@ -205,7 +205,7 @@ void gtk_image_set_from_gicon     (GtkImage
 				   GIcon           *icon,
 				   GtkIconSize      size);
 void gtk_image_set_pixel_size     (GtkImage        *image,
-				   gint             pixel_size);
+				   GdkUnit          pixel_size);
 
 GtkImageType gtk_image_get_storage_type (GtkImage   *image);
 
@@ -230,6 +230,7 @@ void       gtk_image_get_gicon     (GtkImage
 				    GIcon                **gicon,
 				    GtkIconSize           *size);
 gint       gtk_image_get_pixel_size (GtkImage             *image);
+GdkUnit    gtk_image_get_pixel_size_unit (GtkImage *image);
 
 #ifndef GTK_DISABLE_DEPRECATED
 /* These three are deprecated */
Index: gtk/gtkcolorbutton.c
===================================================================
--- gtk/gtkcolorbutton.c	(revision 21028)
+++ gtk/gtkcolorbutton.c	(working copy)
@@ -129,6 +129,7 @@ static void gtk_color_button_drag_data_received (G
 						 guint32           time,
 						 GtkColorButton   *color_button);
 
+static void gtk_color_button_unit_changed (GtkWidget *widget);
 
 static guint color_button_signals[LAST_SIGNAL] = { 0 };
 
@@ -154,6 +155,7 @@ gtk_color_button_class_init (GtkColorButtonClass *
   widget_class->realize = gtk_color_button_realize;
   widget_class->unrealize = gtk_color_button_unrealize;
   widget_class->style_set = gtk_color_button_style_set;
+  widget_class->unit_changed = gtk_color_button_unit_changed;
   button_class->clicked = gtk_color_button_clicked;
   klass->color_set = NULL;
 
@@ -534,7 +536,7 @@ gtk_color_button_init (GtkColorButton *color_butto
   gtk_widget_push_composite_child ();
 
   alignment = gtk_alignment_new (0.5, 0.5, 0.5, 1.0);
-  gtk_container_set_border_width (GTK_CONTAINER (alignment), 1);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment), GDK_UNIT_ONE_TWELFTH_EM (1));
   gtk_container_add (GTK_CONTAINER (color_button), alignment);
   gtk_widget_show (alignment);
 
@@ -550,7 +552,9 @@ gtk_color_button_init (GtkColorButton *color_butto
   pango_layout_get_pixel_extents (layout, NULL, &rect);
   g_object_unref (layout);
 
-  gtk_widget_set_size_request (color_button->priv->draw_area, rect.width - 2, rect.height - 2);
+  gtk_widget_set_size_request (color_button->priv->draw_area,
+                               GDK_UNIT_ONE_TWELFTH_EM (rect.width - 2),
+                               GDK_UNIT_ONE_TWELFTH_EM (rect.height - 2));
   g_signal_connect (color_button->priv->draw_area, "expose-event",
                     G_CALLBACK (expose_event), color_button);
   gtk_container_add (GTK_CONTAINER (frame), color_button->priv->draw_area);
@@ -993,5 +997,22 @@ gtk_color_button_get_property (GObject    *object,
     }
 }
 
+static void
+gtk_color_button_unit_changed (GtkWidget *widget)
+{
+  GtkColorButton *color_button = GTK_COLOR_BUTTON (widget);
+
+  if (GTK_WIDGET_REALIZED (widget))
+    {
+      if (color_button->priv->pixbuf != NULL)
+	g_object_unref (color_button->priv->pixbuf);
+      color_button->priv->pixbuf = NULL;
+    }
+
+  /* must chain up */
+  if (GTK_WIDGET_CLASS (gtk_color_button_parent_class)->unit_changed != NULL)
+    GTK_WIDGET_CLASS (gtk_color_button_parent_class)->unit_changed (widget);
+}
+
 #define __GTK_COLOR_BUTTON_C__
 #include "gtkaliasdef.c"
Index: gtk/gtkmisc.c
===================================================================
--- gtk/gtkmisc.c	(revision 21028)
+++ gtk/gtkmisc.c	(working copy)
@@ -40,6 +40,14 @@ enum {
   PROP_YPAD
 };
 
+#define GTK_MISC_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_MISC, GtkMiscPrivate))
+
+struct _GtkMiscPrivate
+{
+  GdkUnit xpad_unit;
+  GdkUnit ypad_unit;
+};
+
 static void gtk_misc_realize      (GtkWidget    *widget);
 static void gtk_misc_set_property (GObject         *object,
 				   guint            prop_id,
@@ -50,6 +58,7 @@ static void gtk_misc_get_property (GObject
 				   GValue          *value,
 				   GParamSpec      *pspec);
 
+static void gtk_misc_unit_changed (GtkWidget *widget);
 
 G_DEFINE_ABSTRACT_TYPE (GtkMisc, gtk_misc, GTK_TYPE_WIDGET)
 
@@ -66,6 +75,7 @@ gtk_misc_class_init (GtkMiscClass *class)
   gobject_class->get_property = gtk_misc_get_property;
   
   widget_class->realize = gtk_misc_realize;
+  widget_class->unit_changed = gtk_misc_unit_changed;
 
   g_object_class_install_property (gobject_class,
                                    PROP_XALIGN,
@@ -89,32 +99,33 @@ gtk_misc_class_init (GtkMiscClass *class)
 
   g_object_class_install_property (gobject_class,
                                    PROP_XPAD,
-                                   g_param_spec_int ("xpad",
-						     P_("X pad"),
-						     P_("The amount of space to add on the left and right of the widget, in pixels"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("xpad",
+                                                        P_("X pad"),
+                                                        P_("The amount of space to add on the left and right of the widget, in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
                                    PROP_YPAD,
-                                   g_param_spec_int ("ypad",
-						     P_("Y pad"),
-						     P_("The amount of space to add on the top and bottom of the widget, in pixels"),
-						     0,
-						     G_MAXINT,
-						     0,
-						     GTK_PARAM_READWRITE));
+                                   gdk_param_spec_unit ("ypad",
+                                                        P_("Y pad"),
+                                                        P_("The amount of space to add on the top and bottom of the widget, in pixels"),
+                                                        0,
+                                                        GTK_PARAM_READWRITE));
+
+  g_type_class_add_private (gobject_class, sizeof (GtkMiscPrivate));
 }
 
 static void
 gtk_misc_init (GtkMisc *misc)
 {
+  GtkMiscPrivate *priv = GTK_MISC_GET_PRIVATE (misc);
   misc->xalign = 0.5;
   misc->yalign = 0.5;
   misc->xpad = 0;
   misc->ypad = 0;
+  priv->xpad_unit = 0;
+  priv->ypad_unit = 0;
 }
 
 static void
@@ -124,8 +135,10 @@ gtk_misc_set_property (GObject      *object,
 		       GParamSpec   *pspec)
 {
   GtkMisc *misc;
+  GtkMiscPrivate *priv;
 
   misc = GTK_MISC (object);
+  priv = GTK_MISC_GET_PRIVATE (misc);
 
   switch (prop_id)
     {
@@ -136,10 +149,10 @@ gtk_misc_set_property (GObject      *object,
       gtk_misc_set_alignment (misc, misc->xalign, g_value_get_float (value));
       break;
     case PROP_XPAD:
-      gtk_misc_set_padding (misc, g_value_get_int (value), misc->ypad);
+      gtk_misc_set_padding (misc, gdk_value_get_unit (value), priv->ypad_unit);
       break;
     case PROP_YPAD:
-      gtk_misc_set_padding (misc, misc->xpad, g_value_get_int (value));
+      gtk_misc_set_padding (misc, priv->xpad_unit, gdk_value_get_unit (value));
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -154,8 +167,10 @@ gtk_misc_get_property (GObject      *object,
 		       GParamSpec   *pspec)
 {
   GtkMisc *misc;
+  GtkMiscPrivate *priv;
 
   misc = GTK_MISC (object);
+  priv = GTK_MISC_GET_PRIVATE (misc);
 
   switch (prop_id)
     {
@@ -166,10 +181,10 @@ gtk_misc_get_property (GObject      *object,
       g_value_set_float (value, misc->yalign);
       break;
     case PROP_XPAD:
-      g_value_set_int (value, misc->xpad);
+      gdk_value_set_unit (value, priv->xpad_unit);
       break;
     case PROP_YPAD:
-      g_value_set_int (value, misc->ypad);
+      gdk_value_set_unit (value, priv->ypad_unit);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -244,33 +259,36 @@ gtk_misc_get_alignment (GtkMisc *misc,
 
 void
 gtk_misc_set_padding (GtkMisc *misc,
-		      gint     xpad,
-		      gint     ypad)
+		      GdkUnit  xpad,
+		      GdkUnit  ypad)
 {
+  GtkMiscPrivate *priv = GTK_MISC_GET_PRIVATE (misc);
   GtkRequisition *requisition;
   
   g_return_if_fail (GTK_IS_MISC (misc));
   
-  if (xpad < 0)
+  if (GDK_UNIT_TO_PIXEL (xpad) < 0)
     xpad = 0;
-  if (ypad < 0)
+  if (GDK_UNIT_TO_PIXEL (ypad) < 0)
     ypad = 0;
   
-  if ((xpad != misc->xpad) || (ypad != misc->ypad))
+  if ((xpad != priv->xpad_unit) || (ypad != priv->ypad_unit))
     {
       g_object_freeze_notify (G_OBJECT (misc));
-      if (xpad != misc->xpad)
+      if (xpad != priv->xpad_unit)
 	g_object_notify (G_OBJECT (misc), "xpad");
 
-      if (ypad != misc->ypad)
+      if (ypad != priv->ypad_unit)
 	g_object_notify (G_OBJECT (misc), "ypad");
 
       requisition = &(GTK_WIDGET (misc)->requisition);
       requisition->width -= misc->xpad * 2;
       requisition->height -= misc->ypad * 2;
       
-      misc->xpad = xpad;
-      misc->ypad = ypad;
+      misc->xpad = GDK_UNIT_TO_PIXEL (xpad);
+      misc->ypad = GDK_UNIT_TO_PIXEL (ypad);
+      priv->xpad_unit = xpad;
+      priv->ypad_unit = ypad;
       
       requisition->width += misc->xpad * 2;
       requisition->height += misc->ypad * 2;
@@ -296,14 +314,45 @@ gtk_misc_get_padding (GtkMisc *misc,
 		      gint    *xpad,
 		      gint    *ypad)
 {
+  GtkMiscPrivate *priv;
+
   g_return_if_fail (GTK_IS_MISC (misc));
 
+  priv = GTK_MISC_GET_PRIVATE (misc);
+
   if (xpad)
-    *xpad = misc->xpad;
+    *xpad = GDK_UNIT_TO_PIXEL (priv->xpad_unit);
   if (ypad)
-    *ypad = misc->ypad;
+    *ypad = GDK_UNIT_TO_PIXEL (priv->ypad_unit);
 }
 
+/**
+ * gtk_misc_get_padding_unit:
+ * @misc: a #GtkMisc
+ * @xpad: location to store padding in the X direction, or %NULL
+ * @ypad: location to store padding in the Y direction, or %NULL
+ *
+ * Like gtk_misc_get_padding() but preserves the unit.
+ *
+ * Since: 2.14
+ **/
+void
+gtk_misc_get_padding_unit (GtkMisc *misc,
+                           GdkUnit *xpad,
+                           GdkUnit *ypad)
+{
+  GtkMiscPrivate *priv;
+
+  g_return_if_fail (GTK_IS_MISC (misc));
+
+  priv = GTK_MISC_GET_PRIVATE (misc);
+
+  if (xpad)
+    *xpad = priv->xpad_unit;
+  if (ypad)
+    *ypad = priv->ypad_unit;
+}
+
 static void
 gtk_misc_realize (GtkWidget *widget)
 {
@@ -339,5 +388,19 @@ gtk_misc_realize (GtkWidget *widget)
     }
 }
 
+static void
+gtk_misc_unit_changed (GtkWidget *widget)
+{
+  GtkMisc *misc = GTK_MISC (widget);
+  GtkMiscPrivate *priv = GTK_MISC_GET_PRIVATE (misc);
+
+  misc->xpad = GDK_UNIT_TO_PIXEL (priv->xpad_unit);
+  misc->ypad = GDK_UNIT_TO_PIXEL (priv->ypad_unit);
+
+  /* must chain up */
+  if (GTK_WIDGET_CLASS (gtk_misc_parent_class)->unit_changed != NULL)
+    GTK_WIDGET_CLASS (gtk_misc_parent_class)->unit_changed (widget);
+}
+
 #define __GTK_MISC_C__
 #include "gtkaliasdef.c"
Index: gtk/gtkmisc.h
===================================================================
--- gtk/gtkmisc.h	(revision 21028)
+++ gtk/gtkmisc.h	(working copy)
@@ -48,6 +48,7 @@ G_BEGIN_DECLS
 
 typedef struct _GtkMisc	      GtkMisc;
 typedef struct _GtkMiscClass  GtkMiscClass;
+typedef struct _GtkMiscPrivate GtkMiscPrivate;
 
 struct _GtkMisc
 {
@@ -74,11 +75,14 @@ void    gtk_misc_get_alignment (GtkMisc *misc,
 				gfloat  *xalign,
 				gfloat  *yalign);
 void	gtk_misc_set_padding   (GtkMisc *misc,
-				gint	 xpad,
-				gint	 ypad);
+				GdkUnit	 xpad,
+				GdkUnit	 ypad);
 void    gtk_misc_get_padding   (GtkMisc *misc,
 				gint    *xpad,
 				gint    *ypad);
+void    gtk_misc_get_padding_unit (GtkMisc *misc,
+                                   GdkUnit *xpad,
+                                   GdkUnit *ypad);
 
 
 G_END_DECLS
Index: gtk/gtklabel.c
===================================================================
--- gtk/gtklabel.c	(revision 21028)
+++ gtk/gtklabel.c	(working copy)
@@ -2403,7 +2403,7 @@ gtk_label_ensure_layout (GtkLabel *label)
 	  
 	  aux_info = _gtk_widget_get_aux_info (widget, FALSE);
 	  if (aux_info && aux_info->width > 0)
-	    pango_layout_set_width (label->layout, aux_info->width * PANGO_SCALE);
+	    pango_layout_set_width (label->layout, GDK_UNIT_TO_PIXEL (aux_info->width) * PANGO_SCALE);
 	  else
 	    {
 	      GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (label));
@@ -2523,7 +2523,7 @@ gtk_label_size_request (GtkWidget      *widget,
   if ((label->wrap || label->ellipsize || 
        priv->width_chars > 0 || priv->max_width_chars > 0) && 
       aux_info && aux_info->width > 0)
-    width += aux_info->width;
+    width += GDK_UNIT_TO_PIXEL (aux_info->width);
   else if (label->ellipsize || priv->width_chars > 0 || priv->max_width_chars > 0)
     {
       width += PANGO_PIXELS (get_label_char_width (label));
Index: gtk/gtkentry.c
===================================================================
--- gtk/gtkentry.c	(revision 21028)
+++ gtk/gtkentry.c	(working copy)
@@ -60,7 +60,7 @@
 
 #define GTK_ENTRY_COMPLETION_KEY "gtk-entry-completion-key"
 
-#define MIN_ENTRY_WIDTH  150
+#define MIN_ENTRY_WIDTH  GDK_UNIT_ONE_TWELFTH_EM(150)
 #define DRAW_TIMEOUT     20
 #define COMPLETION_TIMEOUT 300
 #define PASSWORD_HINT_MAX 8
@@ -71,11 +71,19 @@
 /* Maximum size of text buffer, in bytes */
 #define MAX_SIZE G_MAXUSHORT
 
-static const GtkBorder default_inner_border = { 2, 2, 2, 2 };
 static GQuark          quark_inner_border   = 0;
 static GQuark          quark_password_hint  = 0;
 static GQuark          quark_cursor_hadjustment = 0;
 
+static void
+set_default_inner_border (GtkBorder *border)
+{
+  border->left   = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (2));
+  border->right  = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (2));
+  border->top    = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (2));
+  border->bottom = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (2));
+}
+
 typedef struct _GtkEntryPrivate GtkEntryPrivate;
 
 #define GTK_ENTRY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ENTRY, GtkEntryPrivate))
@@ -1437,7 +1445,7 @@ gtk_entry_size_request (GtkWidget      *widget,
   _gtk_entry_effective_inner_border (entry, &inner_border);
 
   if (entry->width_chars < 0)
-    requisition->width = MIN_ENTRY_WIDTH + xborder * 2 + inner_border.left + inner_border.right;
+    requisition->width = GDK_UNIT_TO_PIXEL (MIN_ENTRY_WIDTH) + xborder * 2 + inner_border.left + inner_border.right;
   else
     {
       gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
@@ -1559,12 +1567,16 @@ _gtk_entry_effective_inner_border (GtkEntry  *entr
 
   if (tmp_border)
     {
+      tmp_border->left = GDK_UNIT_TO_PIXEL (tmp_border->left);
+      tmp_border->right = GDK_UNIT_TO_PIXEL (tmp_border->right);
+      tmp_border->top = GDK_UNIT_TO_PIXEL (tmp_border->top);
+      tmp_border->bottom = GDK_UNIT_TO_PIXEL (tmp_border->bottom);
       *border = *tmp_border;
       gtk_border_free (tmp_border);
       return;
     }
 
-  *border = default_inner_border;
+  set_default_inner_border (border);
 }
 
 static void
Index: gtk/gtkinputdialog.c
===================================================================
--- gtk/gtkinputdialog.c	(revision 21028)
+++ gtk/gtkinputdialog.c	(working copy)
@@ -84,11 +84,11 @@ enum
 };
 
 
-#define AXIS_LIST_WIDTH 160
-#define AXIS_LIST_HEIGHT 175
+#define AXIS_LIST_WIDTH GDK_UNIT_ONE_TWELFTH_EM (160)
+#define AXIS_LIST_HEIGHT GDK_UNIT_ONE_TWELFTH_EM (175)
 
-#define KEYS_LIST_WIDTH 200
-#define KEYS_LIST_HEIGHT 175
+#define KEYS_LIST_WIDTH GDK_UNIT_ONE_TWELFTH_EM (200)
+#define KEYS_LIST_HEIGHT GDK_UNIT_ONE_TWELFTH_EM (175)
 
 /* Forward declarations */
 
@@ -192,20 +192,20 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
   gtk_window_set_title (GTK_WINDOW (inputd), _("Input"));
 
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   /* main vbox */
 
-  private->main_vbox = gtk_vbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (private->main_vbox), 5);
+  private->main_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
+  gtk_container_set_border_width (GTK_CONTAINER (private->main_vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (inputd)->vbox), private->main_vbox,
 		      TRUE, TRUE, 0);
 
   private->no_devices_label = gtk_label_new (_("No extended input devices"));
-  gtk_container_set_border_width (GTK_CONTAINER (private->main_vbox), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (private->main_vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (inputd)->vbox),
 		      private->no_devices_label,
 		      TRUE, TRUE, 0);
@@ -214,7 +214,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
 
   private->device_menu = gtk_menu_new ();
 
-  util_box = gtk_hbox_new (FALSE, 12);
+  util_box = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_box_pack_start (GTK_BOX (private->main_vbox), util_box, FALSE, FALSE, 0);
 
   label = gtk_label_new_with_mnemonic (_("_Device:"));
@@ -279,7 +279,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
   label = gtk_label_new (_("Axes"));
 
   inputd->axis_listbox = gtk_scrolled_window_new (NULL, NULL);
-  gtk_container_set_border_width (GTK_CONTAINER (inputd->axis_listbox), 12);
+  gtk_container_set_border_width (GTK_CONTAINER (inputd->axis_listbox), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(inputd->axis_listbox),
 				  GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
       
@@ -297,7 +297,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
   label = gtk_label_new (_("Keys"));
 
   inputd->keys_listbox = gtk_scrolled_window_new (NULL, NULL);
-  gtk_container_set_border_width (GTK_CONTAINER (inputd->keys_listbox), 12);
+  gtk_container_set_border_width (GTK_CONTAINER (inputd->keys_listbox), GDK_UNIT_ONE_TWELFTH_EM (12));
   gtk_widget_set_size_request (inputd->keys_listbox,
 			       KEYS_LIST_WIDTH, KEYS_LIST_HEIGHT);
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (inputd->keys_listbox),
@@ -543,8 +543,8 @@ gtk_input_dialog_fill_axes(GtkInputDialog *inputd,
       gtk_widget_destroy (inputd->axis_list);
     }
   inputd->axis_list = gtk_table_new (GDK_AXIS_LAST, 2, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (inputd->axis_list), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (inputd->axis_list), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (inputd->axis_list), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (inputd->axis_list), GDK_UNIT_ONE_TWELFTH_EM (12));
   
   viewport = gtk_viewport_new (NULL, NULL);
   old_child = gtk_bin_get_child (GTK_BIN (inputd->axis_listbox));
@@ -567,7 +567,7 @@ gtk_input_dialog_fill_axes(GtkInputDialog *inputd,
       label = gtk_label_new_with_mnemonic (_(axis_use_strings[i]));
       gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
       gtk_table_attach (GTK_TABLE (inputd->axis_list), label, 0, 1, i, i+1, 
-                        GTK_FILL, 0, 2, 2);
+                        GTK_FILL, 0, GDK_UNIT_ONE_TWELFTH_EM (2), GDK_UNIT_ONE_TWELFTH_EM (2));
 
       /* and the use option menu */
       menu = gtk_menu_new();
@@ -594,7 +594,8 @@ gtk_input_dialog_fill_axes(GtkInputDialog *inputd,
       inputd->axis_items[i] = option_menu = gtk_option_menu_new ();
       gtk_label_set_mnemonic_widget (GTK_LABEL (label), option_menu);
       gtk_table_attach (GTK_TABLE (inputd->axis_list), option_menu, 
-			1, 2, i, i+1, GTK_EXPAND | GTK_FILL, 0, 2, 2);
+			1, 2, i, i+1, GTK_EXPAND | GTK_FILL, 0,
+                        GDK_UNIT_ONE_TWELFTH_EM (2), GDK_UNIT_ONE_TWELFTH_EM (2));
 
       gtk_widget_show (option_menu);
       gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
@@ -698,8 +699,8 @@ gtk_input_dialog_fill_keys(GtkInputDialog *inputd,
     }
 
   inputd->keys_list = gtk_table_new (info->num_keys, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (inputd->keys_list), 6);
-  gtk_table_set_col_spacings (GTK_TABLE (inputd->keys_list), 12);
+  gtk_table_set_row_spacings (GTK_TABLE (inputd->keys_list), GDK_UNIT_ONE_TWELFTH_EM (6));
+  gtk_table_set_col_spacings (GTK_TABLE (inputd->keys_list), GDK_UNIT_ONE_TWELFTH_EM (12));
   
   viewport = gtk_viewport_new (NULL, NULL);
   old_child = gtk_bin_get_child (GTK_BIN (inputd->keys_listbox));
@@ -726,14 +727,14 @@ gtk_input_dialog_fill_keys(GtkInputDialog *inputd,
       g_snprintf (buffer, sizeof (buffer), "_%d:", i+1);
       label = gtk_label_new_with_mnemonic (buffer);
       gtk_table_attach (GTK_TABLE (inputd->keys_list), label, 0, 1, i, i+1, 
-			GTK_FILL, 0, 2, 2);
+			GTK_FILL, 0, GDK_UNIT_ONE_TWELFTH_EM (2), GDK_UNIT_ONE_TWELFTH_EM (2));
       gtk_widget_show (label);
 
       /* the entry */
 
-      hbox = gtk_hbox_new (FALSE, 6);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
       gtk_table_attach (GTK_TABLE (inputd->keys_list), hbox, 1, 2, i, i+1, 
-                        GTK_EXPAND | GTK_FILL, 0, 2, 2);
+                        GTK_EXPAND | GTK_FILL, 0, GDK_UNIT_ONE_TWELFTH_EM (2), GDK_UNIT_ONE_TWELFTH_EM (2));
       gtk_widget_show (hbox);
 
       key->entry = gtk_entry_new ();
Index: gtk/gtkassistant.c
===================================================================
--- gtk/gtkassistant.c	(revision 21028)
+++ gtk/gtkassistant.c	(working copy)
@@ -45,8 +45,8 @@
 
 #define GTK_ASSISTANT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_ASSISTANT, GtkAssistantPrivate))
 
-#define HEADER_SPACING 12
-#define ACTION_AREA_SPACING 12
+#define HEADER_SPACING GDK_UNIT_ONE_TWELFTH_EM(12)
+#define ACTION_AREA_SPACING GDK_UNIT_ONE_TWELFTH_EM(12)
 
 typedef struct _GtkAssistantPage GtkAssistantPage;
 
@@ -257,21 +257,17 @@ gtk_assistant_class_init (GtkAssistantClass *class
 		  G_TYPE_NONE, 0);
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("header-padding",
-							     P_("Header Padding"),
-							     P_("Number of pixels around the header."),
-							     0,
-							     G_MAXINT,
-							     6,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("header-padding",
+                                                                P_("Header Padding"),
+                                                                P_("Number of pixels around the header."),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (6),
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("content-padding",
-							     P_("Content Padding"),
-							     P_("Number of pixels around the content pages."),
-							     0,
-							     G_MAXINT,
-							     1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("content-padding",
+                                                                P_("Content Padding"),
+                                                                P_("Number of pixels around the content pages."),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkAssistant:page-type:
@@ -698,7 +694,7 @@ gtk_assistant_init (GtkAssistant *assistant)
   gtk_widget_show (priv->sidebar_image);
 
   /* Action area  */
-  priv->action_area  = gtk_hbox_new (FALSE, 6);
+  priv->action_area  = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   
   assistant->close   = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
   assistant->apply   = gtk_button_new_from_stock (GTK_STOCK_APPLY);
@@ -1058,7 +1054,7 @@ gtk_assistant_size_request (GtkWidget      *widget
 
       if (page->header_image)
 	{
-	  w += gdk_pixbuf_get_width (page->header_image) + HEADER_SPACING;
+	  w += gdk_pixbuf_get_width (page->header_image) + GDK_UNIT_TO_PIXEL (HEADER_SPACING);
 	  h  = MAX (h, gdk_pixbuf_get_height (page->header_image));
 	}
 
@@ -1079,7 +1075,7 @@ gtk_assistant_size_request (GtkWidget      *widget
 
   gtk_widget_size_request (priv->action_area, &child_requisition);
   width   = MAX (width, child_requisition.width);
-  height += child_requisition.height + ACTION_AREA_SPACING;
+  height += child_requisition.height + GDK_UNIT_TO_PIXEL (ACTION_AREA_SPACING);
 
   width += GTK_CONTAINER (widget)->border_width * 2 + content_padding * 2;
   height += GTK_CONTAINER (widget)->border_width * 2 + content_padding * 2;
@@ -1150,7 +1146,7 @@ gtk_assistant_size_allocate (GtkWidget      *widge
     priv->header_image->allocation.height + 2 * header_padding + content_padding;
   child_allocation.width  = allocation->width - 2 * GTK_CONTAINER (widget)->border_width - 2 * content_padding;
   child_allocation.height = allocation->height - 2 * GTK_CONTAINER (widget)->border_width -
-    priv->header_image->allocation.height - 2 * header_padding - ACTION_AREA_SPACING - priv->action_area->allocation.height - 2 * content_padding;
+    priv->header_image->allocation.height - 2 * header_padding - GDK_UNIT_TO_PIXEL (ACTION_AREA_SPACING) - priv->action_area->allocation.height - 2 * content_padding;
 
   if (GTK_WIDGET_VISIBLE (priv->sidebar_image))
     {
@@ -1281,7 +1277,7 @@ assistant_paint_colored_box (GtkWidget *widget)
 		   border_width,
 		   border_width,
 		   widget->allocation.width - 2 * border_width,
-		   widget->allocation.height - priv->action_area->allocation.height - 2 * border_width - ACTION_AREA_SPACING);
+		   widget->allocation.height - priv->action_area->allocation.height - 2 * border_width - GDK_UNIT_TO_PIXEL (ACTION_AREA_SPACING));
   cairo_fill (cr);
 
   /* content box */
@@ -1302,7 +1298,7 @@ assistant_paint_colored_box (GtkWidget *widget)
 		   priv->header_image->allocation.height + content_padding + 2 * header_padding + border_width,
 		   content_width,
 		   widget->allocation.height - 2 * border_width - priv->action_area->allocation.height -
-		   priv->header_image->allocation.height - 2 * content_padding - 2 * header_padding - ACTION_AREA_SPACING);
+		   priv->header_image->allocation.height - 2 * content_padding - 2 * header_padding - GDK_UNIT_TO_PIXEL (ACTION_AREA_SPACING));
   cairo_fill (cr);
 
   cairo_destroy (cr);
@@ -1446,7 +1442,7 @@ gtk_assistant_new (void)
   GtkWidget *assistant;
 
   assistant = g_object_new (GTK_TYPE_ASSISTANT,
-			    "border-width", 12,
+			    "border-width", GDK_UNIT_ONE_TWELFTH_EM (12),
 			    NULL);
   return assistant;
 }
Index: gtk/gtkhbbox.c
===================================================================
--- gtk/gtkhbbox.c	(revision 21028)
+++ gtk/gtkhbbox.c	(working copy)
@@ -35,9 +35,26 @@ static void gtk_hbutton_box_size_request  (GtkWidg
 static void gtk_hbutton_box_size_allocate (GtkWidget      *widget,
 					   GtkAllocation  *allocation);
 
-static gint default_spacing = 30;
+static gint override_default_spacing = -1;
+static gint get_default_spacing (void);
+static void set_default_spacing (gint size);
+
 static gint default_layout_style = GTK_BUTTONBOX_EDGE;
 
+static gint
+get_default_spacing (void)
+{
+  if (override_default_spacing != -1)
+    return override_default_spacing;
+  return GDK_UNIT_ONE_TWELFTH_EM(30);
+}
+
+static void
+set_default_spacing (gint size)
+{
+  override_default_spacing = size;
+}
+
 G_DEFINE_TYPE (GtkHButtonBox, gtk_hbutton_box, GTK_TYPE_BUTTON_BOX)
 
 static void
@@ -73,7 +90,7 @@ gtk_hbutton_box_new (void)
 void 
 gtk_hbutton_box_set_spacing_default (gint spacing)
 {
-  default_spacing = spacing;
+  set_default_spacing (spacing);
 }
 
 
@@ -93,7 +110,7 @@ gtk_hbutton_box_set_layout_default (GtkButtonBoxSt
 gint 
 gtk_hbutton_box_get_spacing_default (void)
 {
-  return default_spacing;
+  return GDK_UNIT_TO_PIXEL (get_default_spacing ());
 }
 
 
Index: gtk/gtkprinteroptionwidget.c
===================================================================
--- gtk/gtkprinteroptionwidget.c	(revision 21028)
+++ gtk/gtkprinteroptionwidget.c	(working copy)
@@ -132,7 +132,7 @@ gtk_printer_option_widget_init (GtkPrinterOptionWi
 {
   widget->priv = GTK_PRINTER_OPTION_WIDGET_GET_PRIVATE (widget); 
 
-  gtk_box_set_spacing (GTK_BOX (widget), 12);
+  gtk_box_set_spacing (GTK_BOX (widget), GDK_UNIT_ONE_TWELFTH_EM (12));
 }
 
 static void
@@ -738,7 +738,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
 
     case GTK_PRINTER_OPTION_TYPE_ALTERNATIVE:
       group = NULL;
-      priv->box = gtk_hbox_new (FALSE, 12);
+      priv->box = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (12));
       gtk_widget_show (priv->box);
       gtk_box_pack_start (GTK_BOX (widget), priv->box, TRUE, TRUE, 0);
       for (i = 0; i < source->num_choices; i++)
@@ -775,8 +775,8 @@ construct_widgets (GtkPrinterOptionWidget *widget)
         GtkWidget *label;
         
         priv->filechooser = gtk_table_new (2, 2, FALSE);
-        gtk_table_set_row_spacings (GTK_TABLE (priv->filechooser), 6);
-        gtk_table_set_col_spacings (GTK_TABLE (priv->filechooser), 12);
+        gtk_table_set_row_spacings (GTK_TABLE (priv->filechooser), GDK_UNIT_ONE_TWELFTH_EM (6));
+        gtk_table_set_col_spacings (GTK_TABLE (priv->filechooser), GDK_UNIT_ONE_TWELFTH_EM (12));
 
         /* TODO: make this a gtkfilechooserentry once we move to GTK */
         priv->entry = gtk_entry_new ();
Index: gtk/gtkmenuitem.c
===================================================================
--- gtk/gtkmenuitem.c	(revision 21028)
+++ gtk/gtkmenuitem.c	(working copy)
@@ -248,31 +248,25 @@ gtk_menu_item_class_init (GtkMenuItemClass *klass)
 						  gtk_rc_property_parse_enum);
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("horizontal-padding",
-							     "Horizontal Padding",
-							     "Padding to left and right of the menu item",
-							     0,
-							     G_MAXINT,
-							     3,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("horizontal-padding",
+                                                                "Horizontal Padding",
+                                                                "Padding to left and right of the menu item",
+                                                                GDK_UNIT_ONE_TWELFTH_EM (3),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("toggle-spacing",
-							     "Icon Spacing",
-							     "Space between icon and label",
-							     0,
-							     G_MAXINT,
-							     5,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("toggle-spacing",
+                                                                "Icon Spacing",
+                                                                "Space between icon and label",
+                                                                GDK_UNIT_ONE_TWELFTH_EM (5),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("arrow-spacing",
-							     "Arrow Spacing",
-							     "Space between label and arrow",
-							     0,
-							     G_MAXINT,
-							     10,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("arrow-spacing",
+                                                                "Arrow Spacing",
+                                                                "Space between label and arrow",
+                                                                GDK_UNIT_ONE_TWELFTH_EM (10),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_float ("arrow-scaling",
Index: gtk/gtkrc.c
===================================================================
--- gtk/gtkrc.c	(revision 21028)
+++ gtk/gtkrc.c	(working copy)
@@ -2550,6 +2550,20 @@ rc_parse_token_or_compound (GScanner   *scanner,
       if (token != G_TOKEN_NONE)
 	return token;
       break;
+    case '!':
+      if (g_scanner_peek_next_token (scanner) == G_TOKEN_FLOAT)
+        {
+          g_scanner_get_next_token (scanner);
+          g_warning ("baz: %g", scanner->value.v_float);
+          g_string_append_printf (gstring, " 0x%lx", (gulong) GDK_UNIT_EM (scanner->value.v_float));
+        }
+      else if (g_scanner_peek_next_token (scanner) == G_TOKEN_INT)
+        {
+          g_scanner_get_next_token (scanner);
+          g_warning ("baz2: %d", scanner->value.v_int);
+          g_string_append_printf (gstring, " 0x%lx", (gulong) GDK_UNIT_EM (scanner->value.v_int));
+        }
+      break;
     case '@':
       if (g_scanner_peek_next_token (scanner) == G_TOKEN_IDENTIFIER)
         {
@@ -2618,6 +2632,7 @@ gtk_rc_parse_assignment (GScanner      *scanner,
   gboolean numbers_2_int        = scanner->config->numbers_2_int;
   gboolean negate = FALSE;
   gboolean is_color = FALSE;
+  gboolean is_unit = FALSE;
   guint    token;
 
   /* check that this is an assignment */
@@ -2645,6 +2660,13 @@ gtk_rc_parse_assignment (GScanner      *scanner,
       is_color = TRUE;
     }
 
+  /* parse optional unit prefixes */
+  if (g_scanner_peek_next_token (scanner) == '!')
+    {
+      g_scanner_get_next_token (scanner); /* eat unit prefix */
+      is_unit = TRUE;
+    }
+
   /* parse optional sign */
   if (!is_color && g_scanner_peek_next_token (scanner) == '-')
     {
@@ -2668,14 +2690,27 @@ gtk_rc_parse_assignment (GScanner      *scanner,
     case G_TOKEN_INT:
       g_scanner_get_next_token (scanner);
       g_value_init (&prop->value, G_TYPE_LONG);
-      g_value_set_long (&prop->value, negate ? -scanner->value.v_int : scanner->value.v_int);
+      if (is_unit)
+        g_value_set_long (&prop->value, GDK_UNIT_EM (scanner->value.v_int));
+      else
+        g_value_set_long (&prop->value, negate ? -scanner->value.v_int : scanner->value.v_int);
       token = G_TOKEN_NONE;
       break;
     case G_TOKEN_FLOAT:
-      g_scanner_get_next_token (scanner);
-      g_value_init (&prop->value, G_TYPE_DOUBLE);
-      g_value_set_double (&prop->value, negate ? -scanner->value.v_float : scanner->value.v_float);
-      token = G_TOKEN_NONE;
+      if (is_unit)
+        {
+          g_scanner_get_next_token (scanner);
+          g_value_init (&prop->value, G_TYPE_LONG);
+          g_value_set_long (&prop->value, GDK_UNIT_EM (scanner->value.v_float));
+          token = G_TOKEN_NONE;
+        }
+      else
+        {
+          g_scanner_get_next_token (scanner);
+          g_value_init (&prop->value, G_TYPE_DOUBLE);
+          g_value_set_double (&prop->value, negate ? -scanner->value.v_float : scanner->value.v_float);
+          token = G_TOKEN_NONE;
+        }
       break;
     case G_TOKEN_STRING:
       g_scanner_get_next_token (scanner);
Index: gtk/gtkmenu.c
===================================================================
--- gtk/gtkmenu.c	(revision 21028)
+++ gtk/gtkmenu.c	(working copy)
@@ -590,40 +590,32 @@ gtk_menu_class_init (GtkMenuClass *class)
 						     GTK_PARAM_READWRITE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("vertical-padding",
-							     P_("Vertical Padding"),
-							     P_("Extra space at the top and bottom of the menu"),
-							     0,
-							     G_MAXINT,
-							     1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("vertical-padding",
+                                                                P_("Vertical Padding"),
+                                                                P_("Extra space at the top and bottom of the menu"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("horizontal-padding",
-                                                             P_("Horizontal Padding"),
-                                                             P_("Extra space at the left and right edges of the menu"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             0,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("horizontal-padding",
+                                                                P_("Horizontal Padding"),
+                                                                P_("Extra space at the left and right edges of the menu"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("vertical-offset",
-							     P_("Vertical Offset"),
-							     P_("When the menu is a submenu, position it this number of pixels offset vertically"),
-							     G_MININT,
-							     G_MAXINT,
-							     0,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("vertical-offset",
+                                                                P_("Vertical Offset"),
+                                                                P_("When the menu is a submenu, position it this number of pixels offset vertically"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("horizontal-offset",
-							     P_("Horizontal Offset"),
-							     P_("When the menu is a submenu, position it this number of pixels offset horizontally"),
-							     G_MININT,
-							     G_MAXINT,
-							     -2,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("horizontal-offset",
+                                                                P_("Horizontal Offset"),
+                                                                P_("When the menu is a submenu, position it this number of pixels offset horizontally"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (-2),
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boolean ("double-arrows",
@@ -1978,7 +1970,7 @@ gtk_menu_set_tearoff_state (GtkMenu  *menu,
 		gtk_window_set_transient_for (GTK_WINDOW (menu->tearoff_window),
 					      GTK_WINDOW (toplevel));
 	      
-	      menu->tearoff_hbox = gtk_hbox_new (FALSE, FALSE);
+	      menu->tearoff_hbox = gtk_hbox_new (FALSE, 0);
 	      gtk_container_add (GTK_CONTAINER (menu->tearoff_window), menu->tearoff_hbox);
 
 	      gdk_drawable_get_size (GTK_WIDGET (menu)->window, &width, &height);
Index: gtk/gtktoolbar.c
===================================================================
--- gtk/gtktoolbar.c	(revision 21028)
+++ gtk/gtktoolbar.c	(working copy)
@@ -60,7 +60,7 @@ typedef struct _ToolbarContent ToolbarContent;
 
 #define DEFAULT_IPADDING    0
 
-#define DEFAULT_SPACE_SIZE  12
+#define DEFAULT_SPACE_SIZE  GDK_UNIT_ONE_TWELFTH_EM(12)
 #define DEFAULT_SPACE_STYLE GTK_TOOLBAR_SPACE_LINE
 #define SPACE_LINE_DIVISION 10.0
 #define SPACE_LINE_START    2.0
@@ -584,31 +584,25 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
   
   /* style properties */
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("space-size",
-							     P_("Spacer size"),
-							     P_("Size of spacers"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_SPACE_SIZE,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("space-size",
+                                                                P_("Spacer size"),
+                                                                P_("Size of spacers"),
+                                                                DEFAULT_SPACE_SIZE,
+                                                                GTK_PARAM_READABLE));
   
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("internal-padding",
-							     P_("Internal padding"),
-							     P_("Amount of border space between the toolbar shadow and the buttons"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_IPADDING,
-                                                             GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("internal-padding",
+                                                                P_("Internal padding"),
+                                                                P_("Amount of border space between the toolbar shadow and the buttons"),
+                                                                DEFAULT_IPADDING,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("max-child-expand",
-                                                             P_("Maximum child expand"),
-                                                             P_("Maximum amount of space an expandable item will be given"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             G_MAXINT,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("max-child-expand",
+                                                                P_("Maximum child expand"),
+                                                                P_("Maximum amount of space an expandable item will be given"),
+                                                                G_MAXINT,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
 					   g_param_spec_enum ("space-style",
@@ -4714,7 +4708,7 @@ toolbar_content_hide_all (ToolbarContent  *content
 static gint
 get_space_size (GtkToolbar *toolbar)
 {
-  gint space_size = DEFAULT_SPACE_SIZE;
+  gint space_size = GDK_UNIT_TO_PIXEL (DEFAULT_SPACE_SIZE);
   
   if (toolbar)
     {
@@ -4828,7 +4822,7 @@ gtk_toolbar_check_new_api (GtkToolbar *toolbar)
 gint
 _gtk_toolbar_get_default_space_size (void)
 {
-  return DEFAULT_SPACE_SIZE;
+  return GDK_UNIT_TO_PIXEL (DEFAULT_SPACE_SIZE);
 }
 
 void
Index: gtk/gtkcheckbutton.c
===================================================================
--- gtk/gtkcheckbutton.c	(revision 21028)
+++ gtk/gtkcheckbutton.c	(working copy)
@@ -32,8 +32,8 @@
 #include "gtkalias.h"
 
 
-#define INDICATOR_SIZE     13
-#define INDICATOR_SPACING  2
+#define INDICATOR_SIZE     GDK_UNIT_ONE_TWELFTH_EM(13)
+#define INDICATOR_SPACING  GDK_UNIT_ONE_TWELFTH_EM(2)
 
 
 static void gtk_check_button_size_request        (GtkWidget           *widget,
@@ -65,21 +65,17 @@ gtk_check_button_class_init (GtkCheckButtonClass *
   class->draw_indicator = gtk_real_check_button_draw_indicator;
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("indicator-size",
-							     P_("Indicator Size"),
-							     P_("Size of check or radio indicator"),
-							     0,
-							     G_MAXINT,
-							     INDICATOR_SIZE,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("indicator-size",
+                                                                P_("Indicator Size"),
+                                                                P_("Size of check or radio indicator"),
+                                                                INDICATOR_SIZE,
+                                                                GTK_PARAM_READABLE));
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("indicator-spacing",
-							     P_("Indicator Spacing"),
-							     P_("Spacing around check or radio indicator"),
-							     0,
-							     G_MAXINT,
-							     INDICATOR_SPACING,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("indicator-spacing",
+                                                                P_("Indicator Spacing"),
+                                                                P_("Spacing around check or radio indicator"),
+                                                                INDICATOR_SPACING,
+                                                                GTK_PARAM_READABLE));
 }
 
 static void
Index: gtk/gtkmountoperation.c
===================================================================
--- gtk/gtkmountoperation.c	(revision 21028)
+++ gtk/gtkmountoperation.c	(working copy)
@@ -463,10 +463,10 @@ gtk_mount_operation_ask_password (GMountOperation
 
   /* Set the dialog up with HIG properties */
   gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
-  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
-  gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->vbox), GDK_UNIT_ONE_TWELFTH_EM (2)); /* 2 * 5 + 2 = 12 */
+  gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (5));
+  gtk_box_set_spacing (GTK_BOX (dialog->action_area), GDK_UNIT_ONE_TWELFTH_EM (6));
 
   gtk_window_set_resizable (window, FALSE);
   gtk_window_set_icon_name (window, GTK_STOCK_DIALOG_AUTHENTICATION);
@@ -484,7 +484,7 @@ gtk_mount_operation_ask_password (GMountOperation
 
   /* Build contents */
   hbox = gtk_hbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, TRUE, TRUE, 0);
 
   icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION,
@@ -493,7 +493,7 @@ gtk_mount_operation_ask_password (GMountOperation
   gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
   gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
 
-  main_vbox = gtk_vbox_new (FALSE, 18);
+  main_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (18));
   gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0);
 
   message_label = gtk_label_new (message);
@@ -502,7 +502,7 @@ gtk_mount_operation_ask_password (GMountOperation
   gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (message_label),
                       FALSE, FALSE, 0);
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
 
   can_anonymous = flags & G_ASK_PASSWORD_ANONYMOUS_SUPPORTED;
@@ -513,7 +513,7 @@ gtk_mount_operation_ask_password (GMountOperation
       GtkWidget *choice;
       GSList    *group;
 
-      anon_box = gtk_vbox_new (FALSE, 6);
+      anon_box = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
       gtk_box_pack_start (GTK_BOX (vbox), anon_box,
                           FALSE, FALSE, 0);
 
@@ -556,8 +556,8 @@ gtk_mount_operation_ask_password (GMountOperation
   priv->entry_container = entry_container;
 
   table = gtk_table_new (rows, 2, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (12));
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (6));
   gtk_container_add (GTK_CONTAINER (entry_container), table);
 
   rows = 0;
@@ -583,7 +583,7 @@ gtk_mount_operation_ask_password (GMountOperation
       GtkWidget  *remember_box;
       GSList     *group;
 
-      remember_box = gtk_vbox_new (FALSE, 6);
+      remember_box = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (6));
       gtk_box_pack_start (GTK_BOX (vbox), remember_box,
                           FALSE, FALSE, 0);
 
Index: gtk/gtkarrow.c
===================================================================
--- gtk/gtkarrow.c	(revision 21028)
+++ gtk/gtkarrow.c	(working copy)
@@ -31,7 +31,7 @@
 #include "gtkintl.h"
 #include "gtkalias.h"
 
-#define MIN_ARROW_SIZE  15
+#define MIN_ARROW_SIZE GDK_UNIT_ONE_TWELFTH_EM(15)
 
 enum {
   PROP_0,
@@ -150,8 +150,8 @@ gtk_arrow_init (GtkArrow *arrow)
 {
   GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
 
-  GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
-  GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
+  GTK_WIDGET (arrow)->requisition.width = GDK_UNIT_TO_PIXEL (MIN_ARROW_SIZE) + GTK_MISC (arrow)->xpad * 2;
+  GTK_WIDGET (arrow)->requisition.height = GDK_UNIT_TO_PIXEL (MIN_ARROW_SIZE) + GTK_MISC (arrow)->ypad * 2;
 
   arrow->arrow_type = GTK_ARROW_RIGHT;
   arrow->shadow_type = GTK_SHADOW_OUT;
Index: gtk/gtkhbox.c
===================================================================
--- gtk/gtkhbox.c	(revision 21028)
+++ gtk/gtkhbox.c	(working copy)
@@ -62,7 +62,7 @@ gtk_hbox_new (gboolean homogeneous,
 
   hbox = g_object_new (GTK_TYPE_HBOX, NULL);
 
-  GTK_BOX (hbox)->spacing = spacing;
+  gtk_box_set_spacing (GTK_BOX (hbox), spacing);
   GTK_BOX (hbox)->homogeneous = homogeneous ? TRUE : FALSE;
 
   return GTK_WIDGET (hbox);
Index: gtk/gtkcontainer.c
===================================================================
--- gtk/gtkcontainer.c	(revision 21028)
+++ gtk/gtkcontainer.c	(working copy)
@@ -57,6 +57,13 @@ enum {
   PROP_CHILD
 };
 
+#define GTK_CONTAINER_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_CONTAINER, GtkContainerPrivate))
+
+struct _GtkContainerPrivate
+{
+  GdkUUnit border_width_unit;
+};
+
 #define PARAM_SPEC_PARAM_ID(pspec)              ((pspec)->param_id)
 #define PARAM_SPEC_SET_PARAM_ID(pspec, id)      ((pspec)->param_id = (id))
 
@@ -100,6 +107,8 @@ static void     gtk_container_unmap
 static gchar* gtk_container_child_default_composite_name (GtkContainer *container,
 							  GtkWidget    *child);
 
+static void gtk_container_unit_changed (GtkWidget *widget);
+
 /* GtkBuildable */
 static void gtk_container_buildable_init           (GtkBuildableIface *iface);
 static void gtk_container_buildable_add_child      (GtkBuildable *buildable,
@@ -222,6 +231,7 @@ gtk_container_class_init (GtkContainerClass *class
   widget_class->map = gtk_container_map;
   widget_class->unmap = gtk_container_unmap;
   widget_class->focus = gtk_container_focus;
+  widget_class->unit_changed = gtk_container_unit_changed;
   
   class->add = gtk_container_add_unimplemented;
   class->remove = gtk_container_remove_unimplemented;
@@ -241,13 +251,11 @@ gtk_container_class_init (GtkContainerClass *class
                                                       GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
                                    PROP_BORDER_WIDTH,
-                                   g_param_spec_uint ("border-width",
-                                                      P_("Border width"),
-                                                      P_("The width of the empty border outside the containers children"),
-						      0,
-						      G_MAXINT,
-						      0,
-                                                      GTK_PARAM_READWRITE));
+                                   gdk_param_spec_uunit ("border-width",
+                                                         P_("Border width"),
+                                                         P_("The width of the empty border outside the containers children"),
+                                                         0,
+                                                         GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
                                    PROP_CHILD,
                                    g_param_spec_object ("child",
@@ -290,6 +298,8 @@ gtk_container_class_init (GtkContainerClass *class
 		  _gtk_marshal_VOID__OBJECT,
 		  G_TYPE_NONE, 1,
 		  GTK_TYPE_WIDGET);
+
+  g_type_class_add_private (gobject_class, sizeof (GtkContainerPrivate));
 }
 
 static void
@@ -998,8 +1008,10 @@ gtk_container_remove_unimplemented (GtkContainer
 static void
 gtk_container_init (GtkContainer *container)
 {
+  GtkContainerPrivate *priv = GTK_CONTAINER_GET_PRIVATE (container);
   container->focus_child = NULL;
   container->border_width = 0;
+  priv->border_width_unit = 0;
   container->need_resize = FALSE;
   container->resize_mode = GTK_RESIZE_PARENT;
   container->reallocate_redraws = FALSE;
@@ -1036,7 +1048,7 @@ gtk_container_set_property (GObject         *objec
   switch (prop_id)
     {
     case PROP_BORDER_WIDTH:
-      gtk_container_set_border_width (container, g_value_get_uint (value));
+      gtk_container_set_border_width (container, gdk_value_get_uunit (value));
       break;
     case PROP_RESIZE_MODE:
       gtk_container_set_resize_mode (container, g_value_get_enum (value));
@@ -1057,11 +1069,12 @@ gtk_container_get_property (GObject         *objec
 			    GParamSpec      *pspec)
 {
   GtkContainer *container = GTK_CONTAINER (object);
+  GtkContainerPrivate *priv = GTK_CONTAINER_GET_PRIVATE (container);
   
   switch (prop_id)
     {
     case PROP_BORDER_WIDTH:
-      g_value_set_uint (value, container->border_width);
+      gdk_value_set_uunit (value, priv->border_width_unit);
       break;
     case PROP_RESIZE_MODE:
       g_value_set_enum (value, container->resize_mode);
@@ -1091,13 +1104,18 @@ gtk_container_get_property (GObject         *objec
  **/
 void
 gtk_container_set_border_width (GtkContainer *container,
-				guint         border_width)
+				GdkUUnit      border_width)
 {
+  GtkContainerPrivate *priv;
+
   g_return_if_fail (GTK_IS_CONTAINER (container));
 
-  if (container->border_width != border_width)
+  priv = GTK_CONTAINER_GET_PRIVATE (container);
+
+  if (priv->border_width_unit != border_width)
     {
-      container->border_width = border_width;
+      container->border_width = GDK_UNIT_TO_PIXEL (border_width);
+      priv->border_width_unit = border_width;
       g_object_notify (G_OBJECT (container), "border-width");
       
       if (GTK_WIDGET_REALIZED (container))
@@ -1117,12 +1135,38 @@ gtk_container_set_border_width (GtkContainer *cont
 guint
 gtk_container_get_border_width (GtkContainer *container)
 {
+  GtkContainerPrivate *priv;
+
   g_return_val_if_fail (GTK_IS_CONTAINER (container), 0);
 
-  return container->border_width;
+  priv = GTK_CONTAINER_GET_PRIVATE (container);
+
+  return GDK_UNIT_TO_PIXEL (priv->border_width_unit);
 }
 
 /**
+ * gtk_container_get_border_width_unit:
+ * @container: a #GtkContainer
+ * 
+ * Like gtk_container_get_border_width() but preserves the unit.
+ *
+ * Return value: the current border width
+ *
+ * Since: 2.14
+ **/
+GdkUUnit
+gtk_container_get_border_width_unit (GtkContainer *container)
+{
+  GtkContainerPrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_CONTAINER (container), 0);
+
+  priv = GTK_CONTAINER_GET_PRIVATE (container);
+
+  return priv->border_width_unit;
+}
+
+/**
  * gtk_container_add:
  * @container: a #GtkContainer
  * @widget: a widget to be placed inside @container
@@ -2691,5 +2735,18 @@ gtk_container_propagate_expose (GtkContainer   *co
     }
 }
 
+static void
+gtk_container_unit_changed (GtkWidget *widget)
+{
+  GtkContainer *container = GTK_CONTAINER (widget);
+  GtkContainerPrivate *priv = GTK_CONTAINER_GET_PRIVATE (container);
+
+  container->border_width = GDK_UNIT_TO_PIXEL (priv->border_width_unit);
+
+  /* must chain up */
+  if (GTK_WIDGET_CLASS (parent_class)->unit_changed != NULL)
+    GTK_WIDGET_CLASS (parent_class)->unit_changed (widget);
+}
+
 #define __GTK_CONTAINER_C__
 #include "gtkaliasdef.c"
Index: gtk/gtkscalebutton.c
===================================================================
--- gtk/gtkscalebutton.c	(revision 21028)
+++ gtk/gtkscalebutton.c	(working copy)
@@ -59,7 +59,7 @@
 
 #include "gtkalias.h"
 
-#define SCALE_SIZE 100
+#define SCALE_SIZE GDK_UNIT_ONE_TWELFTH_EM(100)
 #define CLICK_TIMEOUT 250
 
 enum
@@ -905,9 +905,9 @@ gtk_scale_popup (GtkWidget *widget,
   y += widget->allocation.y;
 
   if (priv->orientation == GTK_ORIENTATION_VERTICAL)
-    gtk_window_move (GTK_WINDOW (priv->dock), x, y - (SCALE_SIZE / 2));
+    gtk_window_move (GTK_WINDOW (priv->dock), x, y - (GDK_UNIT_TO_PIXEL (SCALE_SIZE) / 2));
   else
-    gtk_window_move (GTK_WINDOW (priv->dock), x - (SCALE_SIZE / 2), y);
+    gtk_window_move (GTK_WINDOW (priv->dock), x - (GDK_UNIT_TO_PIXEL (SCALE_SIZE) / 2), y);
 
   gtk_widget_show_all (priv->dock);
 
@@ -930,9 +930,9 @@ gtk_scale_popup (GtkWidget *widget,
 
       x += (widget->allocation.width - priv->dock->allocation.width) / 2;
       y -= startoff;
-      y -= GTK_RANGE (priv->scale)->min_slider_size / 2;
+      y -= GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size) / 2;
       m = priv->scale->allocation.height -
-          GTK_RANGE (priv->scale)->min_slider_size;
+          GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size);
       y -= m * (1.0 - v);
     }
   else
@@ -941,9 +941,9 @@ gtk_scale_popup (GtkWidget *widget,
 
       x -= startoff;
       y += (widget->allocation.height - priv->dock->allocation.height) / 2;
-      x -= GTK_RANGE (priv->scale)->min_slider_size / 2;
+      x -= GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size) / 2;
       m = priv->scale->allocation.width -
-          GTK_RANGE (priv->scale)->min_slider_size;
+          GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size);
       x -= m * v;
     }
 
@@ -1023,15 +1023,15 @@ gtk_scale_popup (GtkWidget *widget,
         {
           e->x = priv->scale->allocation.width / 2;
           m = priv->scale->allocation.height -
-              GTK_RANGE (priv->scale)->min_slider_size;
-          e->y = ((1.0 - v) * m) + GTK_RANGE (priv->scale)->min_slider_size / 2;
+              GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size);
+          e->y = ((1.0 - v) * m) + GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size) / 2;
         }
       else
         {
           e->y = priv->scale->allocation.height / 2;
           m = priv->scale->allocation.width -
-              GTK_RANGE (priv->scale)->min_slider_size;
-          e->x = (v * m) + GTK_RANGE (priv->scale)->min_slider_size / 2;
+              GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size);
+          e->x = (v * m) + GDK_UNIT_TO_PIXEL (GTK_RANGE (priv->scale)->min_slider_size) / 2;
         }
 
       gtk_widget_event (priv->scale, (GdkEvent *) e);
@@ -1399,7 +1399,7 @@ gtk_scale_button_scale_box_new (GtkScaleButton *bu
       scale = g_object_new (GTK_TYPE_SCALE_BUTTON_VSCALE, NULL);
       priv->scale = GTK_WIDGET (scale);
 
-      gtk_widget_set_size_request (priv->scale, -1, SCALE_SIZE);
+      gtk_widget_set_size_request (priv->scale, -1, GDK_UNIT_TO_PIXEL (SCALE_SIZE));
       gtk_range_set_inverted (GTK_RANGE (priv->scale), TRUE);
 
       gtk_box_pack_start (GTK_BOX (box), button->plus_button, TRUE, FALSE, 0);
@@ -1413,7 +1413,7 @@ gtk_scale_button_scale_box_new (GtkScaleButton *bu
       scale = g_object_new (GTK_TYPE_SCALE_BUTTON_HSCALE, NULL);
       priv->scale = GTK_WIDGET (scale);
 
-      gtk_widget_set_size_request (priv->scale, SCALE_SIZE, -1);
+      gtk_widget_set_size_request (priv->scale, GDK_UNIT_TO_PIXEL (SCALE_SIZE), -1);
 
       gtk_box_pack_start (GTK_BOX (box), button->minus_button, TRUE, FALSE, 0);
       gtk_box_pack_start (GTK_BOX (box), priv->scale, TRUE, FALSE, 0);
Index: gtk/gtkcontainer.h
===================================================================
--- gtk/gtkcontainer.h	(revision 21028)
+++ gtk/gtkcontainer.h	(working copy)
@@ -52,6 +52,7 @@ G_BEGIN_DECLS
 
 typedef struct _GtkContainer	   GtkContainer;
 typedef struct _GtkContainerClass  GtkContainerClass;
+typedef struct _GtkContainerPrivate GtkContainerPrivate;
 
 struct _GtkContainer
 {
@@ -108,8 +109,9 @@ struct _GtkContainerClass
 
 GType   gtk_container_get_type		 (void) G_GNUC_CONST;
 void    gtk_container_set_border_width	 (GtkContainer	   *container,
-					  guint		    border_width);
+					  GdkUUnit	    border_width);
 guint   gtk_container_get_border_width   (GtkContainer     *container);
+GdkUUnit gtk_container_get_border_width_unit (GtkContainer     *container);
 void    gtk_container_add		 (GtkContainer	   *container,
 					  GtkWidget	   *widget);
 void    gtk_container_remove		 (GtkContainer	   *container,
Index: gtk/gtknotebook.c
===================================================================
--- gtk/gtknotebook.c	(revision 21028)
+++ gtk/gtknotebook.c	(working copy)
@@ -192,6 +192,9 @@ struct _GtkNotebookPrivate
   guint during_reorder : 1;
   guint during_detach  : 1;
   guint has_scrolled   : 1;
+
+  GdkUUnit tab_hborder_unit;
+  GdkUUnit tab_vborder_unit;
 };
 
 static const GtkTargetEntry notebook_targets [] = {
@@ -407,11 +410,11 @@ static void gtk_notebook_menu_detacher       (GtkW
 static void gtk_notebook_set_homogeneous_tabs_internal (GtkNotebook *notebook,
 							gboolean     homogeneous);
 static void gtk_notebook_set_tab_border_internal       (GtkNotebook *notebook,
-							guint        border_width);
+							GdkUUnit     border_width);
 static void gtk_notebook_set_tab_hborder_internal      (GtkNotebook *notebook,
-							guint        tab_hborder);
+							GdkUUnit     tab_hborder);
 static void gtk_notebook_set_tab_vborder_internal      (GtkNotebook *notebook,
-							guint        tab_vborder);
+							GdkUUnit     tab_vborder);
 
 static void gtk_notebook_update_tab_states             (GtkNotebook *notebook);
 static gboolean gtk_notebook_mnemonic_activate_switch_page (GtkWidget *child,
@@ -585,31 +588,25 @@ gtk_notebook_class_init (GtkNotebookClass *class)
  						      GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
 				   PROP_TAB_BORDER,
-				   g_param_spec_uint ("tab-border",
- 						      P_("Tab Border"),
- 						      P_("Width of the border around the tab labels"),
- 						      0,
- 						      G_MAXUINT,
- 						      2,
- 						      GTK_PARAM_WRITABLE));
+				   gdk_param_spec_uunit ("tab-border",
+                                                         P_("Tab Border"),
+                                                         P_("Width of the border around the tab labels"),
+                                                         GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                         GTK_PARAM_WRITABLE));
   g_object_class_install_property (gobject_class,
 				   PROP_TAB_HBORDER,
-				   g_param_spec_uint ("tab-hborder",
- 						      P_("Horizontal Tab Border"),
- 						      P_("Width of the horizontal border of tab labels"),
- 						      0,
- 						      G_MAXUINT,
- 						      2,
- 						      GTK_PARAM_READWRITE));
+				   gdk_param_spec_uunit ("tab-hborder",
+                                                         P_("Horizontal Tab Border"),
+                                                         P_("Width of the horizontal border of tab labels"),
+                                                         GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                         GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
 				   PROP_TAB_VBORDER,
-				   g_param_spec_uint ("tab-vborder",
- 						      P_("Vertical Tab Border"),
- 						      P_("Width of the vertical border of tab labels"),
- 						      0,
- 						      G_MAXUINT,
- 						      2,
- 						      GTK_PARAM_READWRITE));
+				   gdk_param_spec_uunit ("tab-vborder",
+                                                         P_("Vertical Tab Border"),
+                                                         P_("Width of the vertical border of tab labels"),
+                                                         GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                         GTK_PARAM_READWRITE));
   g_object_class_install_property (gobject_class,
 				   PROP_SHOW_TABS,
 				   g_param_spec_boolean ("show-tabs",
@@ -797,13 +794,11 @@ gtk_notebook_class_init (GtkNotebookClass *class)
  * Since: 2.10
  */  
   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,
-							     2,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("tab-overlap",
+                                                                P_("Tab overlap"),
+                                                                P_("Size of tab overlap area"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (2),
+                                                                GTK_PARAM_READABLE));
 
 /**
  * GtkNotebook:tab-curvature:
@@ -813,13 +808,11 @@ gtk_notebook_class_init (GtkNotebookClass *class)
  * Since: 2.10
  */  
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("tab-curvature",
-							     P_("Tab curvature"),
-							     P_("Size of tab curvature"),
-							     0,
-							     G_MAXINT,
-							     1,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("tab-curvature",
+                                                                P_("Tab curvature"),
+                                                                P_("Size of tab curvature"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (1),
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkNotebook:arrow-spacing:
@@ -830,13 +823,11 @@ gtk_notebook_class_init (GtkNotebookClass *class)
    * 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,
-                                                             0,
-                                                             GTK_PARAM_READABLE));
+                                           gdk_param_spec_unit ("arrow-spacing",
+                                                                _("Arrow spacing"),
+                                                                _("Scroll arrow spacing"),
+                                                                0,
+                                                                GTK_PARAM_READABLE));
 
   notebook_signals[SWITCH_PAGE] =
     g_signal_new (I_("switch_page"),
@@ -1070,8 +1061,10 @@ gtk_notebook_init (GtkNotebook *notebook)
   notebook->event_window = NULL;
   notebook->menu = NULL;
 
-  notebook->tab_hborder = 2;
-  notebook->tab_vborder = 2;
+  notebook->tab_hborder = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (2));
+  notebook->tab_vborder = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (2));
+  priv->tab_hborder_unit = GDK_UNIT_ONE_TWELFTH_EM (2);
+  priv->tab_vborder_unit = GDK_UNIT_ONE_TWELFTH_EM (2);
 
   notebook->show_tabs = TRUE;
   notebook->show_border = TRUE;
@@ -1519,13 +1512,13 @@ gtk_notebook_set_property (GObject         *object
       gtk_notebook_set_tab_pos (notebook, g_value_get_enum (value));
       break;
     case PROP_TAB_BORDER:
-      gtk_notebook_set_tab_border_internal (notebook, g_value_get_uint (value));
+      gtk_notebook_set_tab_border_internal (notebook, gdk_value_get_uunit (value));
       break;
     case PROP_TAB_HBORDER:
-      gtk_notebook_set_tab_hborder_internal (notebook, g_value_get_uint (value));
+      gtk_notebook_set_tab_hborder_internal (notebook, gdk_value_get_uunit (value));
       break;
     case PROP_TAB_VBORDER:
-      gtk_notebook_set_tab_vborder_internal (notebook, g_value_get_uint (value));
+      gtk_notebook_set_tab_vborder_internal (notebook, gdk_value_get_uunit (value));
       break;
     case PROP_GROUP_ID:
       gtk_notebook_set_group_id (notebook, g_value_get_int (value));
@@ -1575,10 +1568,10 @@ gtk_notebook_get_property (GObject         *object
       g_value_set_enum (value, notebook->tab_pos);
       break;
     case PROP_TAB_HBORDER:
-      g_value_set_uint (value, notebook->tab_hborder);
+      gdk_value_set_uunit (value, priv->tab_hborder_unit);
       break;
     case PROP_TAB_VBORDER:
-      g_value_set_uint (value, notebook->tab_vborder);
+      gdk_value_set_uunit (value, priv->tab_vborder_unit);
       break;
     case PROP_GROUP_ID:
       g_value_set_int (value, gtk_notebook_get_group_id (notebook));
@@ -1793,6 +1786,7 @@ gtk_notebook_size_request (GtkWidget      *widget,
 			   GtkRequisition *requisition)
 {
   GtkNotebook *notebook = GTK_NOTEBOOK (widget);
+  GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
   GtkNotebookPage *page;
   GList *children;
   GtkRequisition child_requisition;
@@ -1882,14 +1876,14 @@ gtk_notebook_size_request (GtkWidget      *widget,
 		    {
 		    case GTK_POS_TOP:
 		    case GTK_POS_BOTTOM:
-		      page->requisition.height += 2 * (notebook->tab_vborder +
+		      page->requisition.height += 2 * (GDK_UNIT_TO_PIXEL (priv->tab_vborder_unit) +
 						       focus_width);
 		      tab_height = MAX (tab_height, page->requisition.height);
 		      tab_max = MAX (tab_max, page->requisition.width);
 		      break;
 		    case GTK_POS_LEFT:
 		    case GTK_POS_RIGHT:
-		      page->requisition.width += 2 * (notebook->tab_hborder +
+		      page->requisition.width += 2 * (GDK_UNIT_TO_PIXEL (priv->tab_hborder_unit) +
 						      focus_width);
 		      tab_width = MAX (tab_width, page->requisition.width);
 		      tab_max = MAX (tab_max, page->requisition.height);
@@ -1916,7 +1910,7 @@ gtk_notebook_size_request (GtkWidget      *widget,
 		    tab_height = MAX (tab_height, scroll_arrow_hlength);
 
 		  padding = 2 * (tab_curvature + focus_width +
-				 notebook->tab_hborder) - tab_overlap;
+				 GDK_UNIT_TO_PIXEL (priv->tab_hborder_unit)) - tab_overlap;
 		  tab_max += padding;
 		  while (children)
 		    {
@@ -1960,7 +1954,7 @@ gtk_notebook_size_request (GtkWidget      *widget,
                                      arrow_spacing + 2 * scroll_arrow_vlength);
 
 		  padding = 2 * (tab_curvature + focus_width +
-				 notebook->tab_vborder) - tab_overlap;
+				 GDK_UNIT_TO_PIXEL (priv->tab_vborder_unit)) - tab_overlap;
 		  tab_max += padding;
 
 		  while (children)
@@ -5562,6 +5556,7 @@ gtk_notebook_page_allocate (GtkNotebook     *noteb
 			    GtkNotebookPage *page)
 {
   GtkWidget *widget = GTK_WIDGET (notebook);
+  GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
   GtkAllocation child_allocation;
   GtkRequisition tab_requisition;
   gint xthickness;
@@ -5586,10 +5581,10 @@ gtk_notebook_page_allocate (GtkNotebook     *noteb
     {
     case GTK_POS_TOP:
     case GTK_POS_BOTTOM:
-      padding = tab_curvature + focus_width + notebook->tab_hborder;
+      padding = tab_curvature + focus_width + GDK_UNIT_TO_PIXEL (priv->tab_hborder_unit);
       if (page->fill)
 	{
-	  child_allocation.x = xthickness + focus_width + notebook->tab_hborder;
+	  child_allocation.x = xthickness + focus_width + GDK_UNIT_TO_PIXEL (priv->tab_hborder_unit);
 	  child_allocation.width = MAX (1, page->allocation.width - 2 * child_allocation.x);
 	  child_allocation.x += page->allocation.x;
 	}
@@ -5601,17 +5596,17 @@ gtk_notebook_page_allocate (GtkNotebook     *noteb
 	  child_allocation.width = tab_requisition.width;
 	}
 
-      child_allocation.y = notebook->tab_vborder + focus_width + page->allocation.y;
+      child_allocation.y = GDK_UNIT_TO_PIXEL (priv->tab_vborder_unit) + focus_width + page->allocation.y;
 
       if (tab_pos == GTK_POS_TOP)
 	child_allocation.y += ythickness;
 
       child_allocation.height = MAX (1, (page->allocation.height - ythickness -
-					 2 * (notebook->tab_vborder + focus_width)));
+					 2 * (GDK_UNIT_TO_PIXEL (priv->tab_vborder_unit) + focus_width)));
       break;
     case GTK_POS_LEFT:
     case GTK_POS_RIGHT:
-      padding = tab_curvature + focus_width + notebook->tab_vborder;
+      padding = tab_curvature + focus_width + GDK_UNIT_TO_PIXEL (priv->tab_vborder_unit);
       if (page->fill)
 	{
 	  child_allocation.y = ythickness + padding;
@@ -5627,13 +5622,13 @@ gtk_notebook_page_allocate (GtkNotebook     *noteb
 	  child_allocation.height = tab_requisition.height;
 	}
 
-      child_allocation.x = notebook->tab_hborder + focus_width + page->allocation.x;
+      child_allocation.x = GDK_UNIT_TO_PIXEL (priv->tab_hborder_unit) + focus_width + page->allocation.x;
 
       if (tab_pos == GTK_POS_LEFT)
 	child_allocation.x += xthickness;
 
       child_allocation.width = MAX (1, (page->allocation.width - xthickness -
-					2 * (notebook->tab_hborder + focus_width)));
+					2 * (GDK_UNIT_TO_PIXEL (priv->tab_hborder_unit) + focus_width)));
       break;
     }
 
@@ -6008,11 +6003,15 @@ gtk_notebook_set_homogeneous_tabs_internal (GtkNot
 
 static void
 gtk_notebook_set_tab_border_internal (GtkNotebook *notebook,
-				      guint        border_width)
+				      GdkUUnit     border_width)
 {
-  notebook->tab_hborder = border_width;
-  notebook->tab_vborder = border_width;
+  GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
 
+  notebook->tab_hborder = GDK_UNIT_TO_PIXEL (border_width);
+  notebook->tab_vborder = GDK_UNIT_TO_PIXEL (border_width);
+  priv->tab_hborder_unit = border_width;
+  priv->tab_vborder_unit = border_width;
+
   if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
     gtk_widget_queue_resize (GTK_WIDGET (notebook));
 
@@ -6024,12 +6023,15 @@ gtk_notebook_set_tab_border_internal (GtkNotebook
 
 static void
 gtk_notebook_set_tab_hborder_internal (GtkNotebook *notebook,
-				       guint        tab_hborder)
+				       GdkUUnit     tab_hborder)
 {
-  if (notebook->tab_hborder == tab_hborder)
+  GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
+
+  if (priv->tab_hborder_unit == tab_hborder)
     return;
 
-  notebook->tab_hborder = tab_hborder;
+  notebook->tab_hborder = GDK_UNIT_TO_PIXEL (tab_hborder);
+  priv->tab_hborder_unit = tab_hborder;
 
   if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
     gtk_widget_queue_resize (GTK_WIDGET (notebook));
@@ -6039,12 +6041,15 @@ gtk_notebook_set_tab_hborder_internal (GtkNotebook
 
 static void
 gtk_notebook_set_tab_vborder_internal (GtkNotebook *notebook,
-				       guint        tab_vborder)
+				       GdkUUnit     tab_vborder)
 {
-  if (notebook->tab_vborder == tab_vborder)
+  GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
+
+  if (priv->tab_vborder_unit == tab_vborder)
     return;
 
-  notebook->tab_vborder = tab_vborder;
+  notebook->tab_vborder = GDK_UNIT_TO_PIXEL (tab_vborder);
+  priv->tab_vborder_unit = tab_vborder;
 
   if (GTK_WIDGET_VISIBLE (notebook) && notebook->show_tabs)
     gtk_widget_queue_resize (GTK_WIDGET (notebook));
@@ -6689,7 +6694,7 @@ gtk_notebook_set_homogeneous_tabs (GtkNotebook *no
  **/
 void
 gtk_notebook_set_tab_border (GtkNotebook *notebook,
-			     guint        border_width)
+			     GdkUUnit     border_width)
 {
   g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
 
@@ -6705,7 +6710,7 @@ gtk_notebook_set_tab_border (GtkNotebook *notebook
  **/
 void
 gtk_notebook_set_tab_hborder (GtkNotebook *notebook,
-			      guint        tab_hborder)
+			      GdkUUnit     tab_hborder)
 {
   g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
 
@@ -6721,7 +6726,7 @@ gtk_notebook_set_tab_hborder (GtkNotebook *noteboo
  **/
 void
 gtk_notebook_set_tab_vborder (GtkNotebook *notebook,
-			      guint        tab_vborder)
+			      GdkUUnit     tab_vborder)
 {
   g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
 
Index: gtk/gtknotebook.h
===================================================================
--- gtk/gtknotebook.h	(revision 21028)
+++ gtk/gtknotebook.h	(working copy)
@@ -219,11 +219,11 @@ GtkPositionType gtk_notebook_get_tab_pos   (GtkNot
 void     gtk_notebook_set_homogeneous_tabs (GtkNotebook     *notebook,
 					    gboolean         homogeneous);
 void     gtk_notebook_set_tab_border       (GtkNotebook     *notebook,
-					    guint            border_width);
+					    GdkUUnit         border_width);
 void     gtk_notebook_set_tab_hborder      (GtkNotebook     *notebook,
-					    guint            tab_hborder);
+					    GdkUUnit         tab_hborder);
 void     gtk_notebook_set_tab_vborder      (GtkNotebook     *notebook,
-					    guint            tab_vborder);
+					    GdkUUnit         tab_vborder);
 #endif /* GTK_DISABLE_DEPRECATED */
 
 void     gtk_notebook_set_scrollable       (GtkNotebook     *notebook,
Index: gtk/gtkbbox.c
===================================================================
--- gtk/gtkbbox.c	(revision 21028)
+++ gtk/gtkbbox.c	(working copy)
@@ -59,9 +59,9 @@ static void gtk_button_box_get_child_property (Gtk
 					       GValue            *value,
 					       GParamSpec        *pspec);
 
-#define DEFAULT_CHILD_MIN_WIDTH 85
-#define DEFAULT_CHILD_MIN_HEIGHT 27
-#define DEFAULT_CHILD_IPAD_X 4
+#define DEFAULT_CHILD_MIN_WIDTH GDK_UNIT_ONE_TWELFTH_EM(85)
+#define DEFAULT_CHILD_MIN_HEIGHT GDK_UNIT_ONE_TWELFTH_EM(27)
+#define DEFAULT_CHILD_IPAD_X GDK_UNIT_ONE_TWELFTH_EM(4)
 #define DEFAULT_CHILD_IPAD_Y 0
 
 G_DEFINE_ABSTRACT_TYPE (GtkButtonBox, gtk_button_box, GTK_TYPE_BOX)
@@ -87,40 +87,32 @@ gtk_button_box_class_init (GtkButtonBoxClass *clas
    * libgobject allows that.
    */
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("child-min-width",
-							     P_("Minimum child width"),
-							     P_("Minimum width of buttons inside the box"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_CHILD_MIN_WIDTH,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("child-min-width",
+                                                                P_("Minimum child width"),
+                                                                P_("Minimum width of buttons inside the box"),
+                                                                DEFAULT_CHILD_MIN_WIDTH,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("child-min-height",
-							     P_("Minimum child height"),
-							     P_("Minimum height of buttons inside the box"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_CHILD_MIN_HEIGHT,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("child-min-height",
+                                                                P_("Minimum child height"),
+                                                                P_("Minimum height of buttons inside the box"),
+                                                                DEFAULT_CHILD_MIN_HEIGHT,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("child-internal-pad-x",
-							     P_("Child internal width padding"),
-							     P_("Amount to increase child's size on either side"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_CHILD_IPAD_X,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("child-internal-pad-x",
+                                                                P_("Child internal width padding"),
+                                                                P_("Amount to increase child's size on either side"),
+                                                                DEFAULT_CHILD_IPAD_X,
+                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("child-internal-pad-y",
-							     P_("Child internal height padding"),
-							     P_("Amount to increase child's size on the top and bottom"),
-							     0,
-							     G_MAXINT,
-                                                             DEFAULT_CHILD_IPAD_Y,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("child-internal-pad-y",
+                                                                P_("Child internal height padding"),
+                                                                P_("Amount to increase child's size on the top and bottom"),
+                                                                DEFAULT_CHILD_IPAD_Y,
+                                                                GTK_PARAM_READABLE));
   g_object_class_install_property (gobject_class,
                                    PROP_LAYOUT_STYLE,
                                    g_param_spec_enum ("layout-style",
@@ -142,7 +134,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *clas
 static void
 gtk_button_box_init (GtkButtonBox *button_box)
 {
-  GTK_BOX (button_box)->spacing = 0;
+  gtk_box_set_spacing (GTK_BOX (button_box), 0);
   button_box->child_min_width = GTK_BUTTONBOX_DEFAULT;
   button_box->child_min_height = GTK_BUTTONBOX_DEFAULT;
   button_box->child_ipad_x = GTK_BUTTONBOX_DEFAULT;
@@ -228,7 +220,7 @@ gtk_button_box_get_child_property (GtkContainer *c
 
 void 
 gtk_button_box_set_child_size (GtkButtonBox *widget, 
-                               gint width, gint height)
+                               GdkUnit width, GdkUnit height)
 {
   g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
 
@@ -238,7 +230,7 @@ gtk_button_box_set_child_size (GtkButtonBox *widge
 
 void 
 gtk_button_box_set_child_ipadding (GtkButtonBox *widget,
-                                   gint ipad_x, gint ipad_y)
+                                   GdkUnit ipad_x, GdkUnit ipad_y)
 {
   g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
 
@@ -273,8 +265,8 @@ gtk_button_box_get_child_size (GtkButtonBox *widge
   g_return_if_fail (width != NULL);
   g_return_if_fail (height != NULL);
 
-  *width  = widget->child_min_width;
-  *height = widget->child_min_height;
+  *width  = GDK_UNIT_TO_PIXEL (widget->child_min_width);
+  *height = GDK_UNIT_TO_PIXEL (widget->child_min_height);
 }
 
 void
@@ -285,8 +277,8 @@ gtk_button_box_get_child_ipadding (GtkButtonBox *w
   g_return_if_fail (ipad_x != NULL);
   g_return_if_fail (ipad_y != NULL);
 
-  *ipad_x = widget->child_ipad_x;
-  *ipad_y = widget->child_ipad_y;
+  *ipad_x = GDK_UNIT_TO_PIXEL (widget->child_ipad_x);
+  *ipad_y = GDK_UNIT_TO_PIXEL (widget->child_ipad_y);
 }
 
 GtkButtonBoxStyle 
@@ -425,14 +417,14 @@ _gtk_button_box_child_requisition (GtkWidget *widg
                         "child-internal-pad-y", &ipad_y_default, 
 			NULL);
   
-  child_min_width = bbox->child_min_width   != GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_min_width : width_default;
-  child_min_height = bbox->child_min_height !=GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_min_height : height_default;
-  ipad_x = bbox->child_ipad_x != GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_ipad_x : ipad_x_default;
-  ipad_y = bbox->child_ipad_y != GTK_BUTTONBOX_DEFAULT
-	  ? bbox->child_ipad_y : ipad_y_default;
+  child_min_width = GDK_UNIT_TO_PIXEL (bbox->child_min_width)   != GTK_BUTTONBOX_DEFAULT
+          ? GDK_UNIT_TO_PIXEL (bbox->child_min_width) : width_default;
+  child_min_height = GDK_UNIT_TO_PIXEL (bbox->child_min_height) !=GTK_BUTTONBOX_DEFAULT
+          ? GDK_UNIT_TO_PIXEL (bbox->child_min_height) : height_default;
+  ipad_x = GDK_UNIT_TO_PIXEL (bbox->child_ipad_x) != GTK_BUTTONBOX_DEFAULT
+          ? GDK_UNIT_TO_PIXEL (bbox->child_ipad_x) : ipad_x_default;
+  ipad_y = GDK_UNIT_TO_PIXEL (bbox->child_ipad_y) != GTK_BUTTONBOX_DEFAULT
+          ? GDK_UNIT_TO_PIXEL (bbox->child_ipad_y) : ipad_y_default;
 
   nchildren = 0;
   nsecondaries = 0;
Index: gtk/gtkbbox.h
===================================================================
--- gtk/gtkbbox.h	(revision 21028)
+++ gtk/gtkbbox.h	(working copy)
@@ -52,10 +52,10 @@ typedef struct _GtkButtonBoxClass  GtkButtonBoxCla
 struct _GtkButtonBox
 {
   GtkBox box;
-  gint GSEAL (child_min_width);
-  gint GSEAL (child_min_height);
-  gint GSEAL (child_ipad_x);
-  gint GSEAL (child_ipad_y);
+  GdkUnit GSEAL (child_min_width);
+  GdkUnit GSEAL (child_min_height);
+  GdkUnit GSEAL (child_ipad_x);
+  GdkUnit GSEAL (child_ipad_y);
   GtkButtonBoxStyle GSEAL (layout_style);
 };
 
@@ -81,17 +81,18 @@ void              gtk_button_box_set_child_seconda
 #define gtk_button_box_get_spacing(b)   gtk_box_get_spacing (GTK_BOX (b))
 
 void gtk_button_box_set_child_size     (GtkButtonBox *widget,
-					gint          min_width,
-					gint          min_height);
+					GdkUnit       min_width,
+					GdkUnit       min_height);
 void gtk_button_box_set_child_ipadding (GtkButtonBox *widget,
-					gint          ipad_x,
-					gint          ipad_y);
+					GdkUnit       ipad_x,
+					GdkUnit       ipad_y);
 void gtk_button_box_get_child_size     (GtkButtonBox *widget,
 					gint         *min_width,
 					gint         *min_height);
 void gtk_button_box_get_child_ipadding (GtkButtonBox *widget,
 					gint         *ipad_x,
 					gint         *ipad_y);
+/* no unit getters because these functions are deprecated already */
 #endif
 
 /* Internal method - do not use. */
Index: gtk/gtkcombobox.c
===================================================================
--- gtk/gtkcombobox.c	(revision 21028)
+++ gtk/gtkcombobox.c	(working copy)
@@ -860,13 +860,11 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
    * Since: 2.12
    */
   gtk_widget_class_install_style_property (widget_class,
-					   g_param_spec_int ("arrow-size",
-							     P_("Arrow Size"),
-							     P_("The minimum size of the arrow in the combo box"),
-							     0,
-							     G_MAXINT,
-							     15,
-							     GTK_PARAM_READABLE));
+					   gdk_param_spec_unit ("arrow-size",
+                                                                P_("Arrow Size"),
+                                                                P_("The minimum size of the arrow in the combo box"),
+                                                                GDK_UNIT_ONE_TWELFTH_EM (15),
+                                                                GTK_PARAM_READABLE));
 
   /**
    * GtkComboBox:shadow-type:
Index: docs/reference/gdk/gdk-sections.txt
===================================================================
--- docs/reference/gdk/gdk-sections.txt	(revision 21028)
+++ docs/reference/gdk/gdk-sections.txt	(working copy)
@@ -1379,3 +1379,26 @@ gdk_test_render_sync
 gdk_test_simulate_button
 gdk_test_simulate_key
 </SECTION>
+
+<SECTION>
+<TITLE>Units</TITLE>
+<FILE>gdkunit</FILE>
+GdkUnit
+GdkUUnit
+
+GDK_UNIT_TO_PIXEL
+GDK_UNIT_EM
+GDK_UNIT_ONE_TWELFTH_EM
+
+gdk_unit_to_string
+
+gdk_param_spec_unit
+gdk_value_set_unit
+gdk_value_get_unit
+gdk_value_unit_skip_conversion
+
+gdk_param_spec_uunit
+gdk_value_set_uunit
+gdk_value_get_uunit
+gdk_value_uunit_skip_conversion
+</SECTION>
Index: docs/reference/gdk/tmpl/gdkscreen.sgml
===================================================================
--- docs/reference/gdk/tmpl/gdkscreen.sgml	(revision 21028)
+++ docs/reference/gdk/tmpl/gdkscreen.sgml	(working copy)
@@ -55,6 +55,14 @@ when GDK gets multihead support.
 
 @gdkscreen: the object which received the signal.
 
+<!-- ##### SIGNAL GdkScreen::unit-changed ##### -->
+<para>
+
+</para>
+
+@gdkscreen: the object which received the signal.
+@arg1: 
+
 <!-- ##### ARG GdkScreen:font-options ##### -->
 <para>
 
Index: docs/reference/gdk/tmpl/gdk-unused.sgml
===================================================================
--- docs/reference/gdk/tmpl/gdk-unused.sgml	(revision 21028)
+++ docs/reference/gdk/tmpl/gdk-unused.sgml	(working copy)
@@ -451,6 +451,20 @@ status information, so the application does not ne
 </para>
 
 
+<!-- ##### STRUCT GdkParamSpecUUnit ##### -->
+<para>
+
+</para>
+
+@parent_instance: 
+
+<!-- ##### STRUCT GdkParamSpecUnit ##### -->
+<para>
+
+</para>
+
+@parent_instance: 
+
 <!-- ##### ENUM GdkPixbufAlphaMode ##### -->
 <para>
 
@@ -901,6 +915,20 @@ they will be ignored.
 @display_name: 
 @Returns: 
 
+<!-- ##### FUNCTION gdk_param_unit_get_type ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
+<!-- ##### FUNCTION gdk_param_uunit_get_type ##### -->
+<para>
+
+</para>
+
+@Returns: 
+
 <!-- ##### FUNCTION gdk_pixbuf_set_as_cairo_source ##### -->
 <para>
 
Index: docs/reference/gdk/gdk-docs.sgml
===================================================================
--- docs/reference/gdk/gdk-docs.sgml	(revision 21028)
+++ docs/reference/gdk/gdk-docs.sgml	(working copy)
@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
-               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
 <!ENTITY gdk-General SYSTEM "xml/general.xml">
 <!ENTITY gdk-Bitmaps-and-Pixmaps SYSTEM "xml/pixmaps.xml">
 <!ENTITY gdk-Images SYSTEM "xml/images.xml">
@@ -32,6 +33,7 @@
 <!ENTITY gdk-Multihead SYSTEM "multihead.sgml">
 <!ENTITY gdk-AppLaunchContext SYSTEM "xml/gdkapplaunchcontext.xml">
 <!ENTITY gdk-Testing SYSTEM "xml/gdktesting.xml">
+<!ENTITY gdk-Unit SYSTEM "xml/gdkunit.xml">
 <!ENTITY version SYSTEM "version.xml">
 ]>
 
@@ -46,6 +48,7 @@
     &gdk-General;
 
     &gdk-Multihead;
+    &gdk-Unit;
     &gdk-Display;
     &gdk-DisplayManager;
     &gdk-Screen;
Index: docs/reference/gtk/gtk-sections.txt
===================================================================
--- docs/reference/gtk/gtk-sections.txt	(revision 21028)
+++ docs/reference/gtk/gtk-sections.txt	(working copy)
@@ -286,6 +286,7 @@ GtkAlignment
 gtk_alignment_new
 gtk_alignment_set
 gtk_alignment_get_padding
+gtk_alignment_get_padding_unit
 gtk_alignment_set_padding
 <SUBSECTION Standard>
 GTK_ALIGNMENT
@@ -429,9 +430,11 @@ gtk_box_pack_end_defaults
 gtk_box_get_homogeneous
 gtk_box_set_homogeneous
 gtk_box_get_spacing
+gtk_box_get_spacing_unit
 gtk_box_set_spacing
 gtk_box_reorder_child
 gtk_box_query_child_packing
+gtk_box_query_child_packing_unit
 gtk_box_set_child_packing
 <SUBSECTION Standard>
 GTK_BOX
@@ -975,6 +978,7 @@ gtk_container_child_get_valist
 gtk_container_child_set_valist
 gtk_container_forall
 gtk_container_get_border_width
+gtk_container_get_border_width_unit
 gtk_container_set_border_width
 gtk_container_propagate_expose
 gtk_container_get_focus_chain
@@ -1336,6 +1340,7 @@ gtk_expander_set_expanded
 gtk_expander_get_expanded
 gtk_expander_set_spacing
 gtk_expander_get_spacing
+gtk_expander_get_spacing_unit
 gtk_expander_set_label
 gtk_expander_get_label
 gtk_expander_set_use_underline
@@ -1855,14 +1860,19 @@ gtk_icon_view_set_columns
 gtk_icon_view_get_columns
 gtk_icon_view_set_item_width
 gtk_icon_view_get_item_width
+gtk_icon_view_get_item_width_unit
 gtk_icon_view_set_spacing
 gtk_icon_view_get_spacing
+gtk_icon_view_get_spacing_unit
 gtk_icon_view_set_row_spacing
 gtk_icon_view_get_row_spacing
+gtk_icon_view_get_row_spacing_unit
 gtk_icon_view_set_column_spacing
 gtk_icon_view_get_column_spacing
+gtk_icon_view_get_column_spacing_unit
 gtk_icon_view_set_margin
 gtk_icon_view_get_margin
+gtk_icon_view_get_margin_unit
 gtk_icon_view_select_path
 gtk_icon_view_unselect_path
 gtk_icon_view_path_is_selected
@@ -1940,6 +1950,7 @@ gtk_image_set
 gtk_image_get
 gtk_image_set_pixel_size
 gtk_image_get_pixel_size
+gtk_image_get_pixel_size_unit
 <SUBSECTION Standard>
 GTK_IMAGE
 GTK_IS_IMAGE
@@ -2503,6 +2514,7 @@ gtk_misc_set_alignment
 gtk_misc_set_padding
 gtk_misc_get_alignment
 gtk_misc_get_padding
+gtk_misc_get_padding_unit
 <SUBSECTION Standard>
 GTK_MISC
 GTK_IS_MISC
@@ -2617,6 +2629,8 @@ gtk_object_remove_data_by_id
 gtk_object_remove_no_notify_by_id
 gtk_object_data_try_key
 gtk_object_data_force_id
+gtk_object_get_unit
+gtk_object_get_unit_valist
 <SUBSECTION Standard>
 GTK_OBJECT
 GTK_IS_OBJECT
@@ -3494,10 +3508,14 @@ gtk_table_set_row_spacings
 gtk_table_set_col_spacings
 gtk_table_set_homogeneous
 gtk_table_get_default_row_spacing
+gtk_table_get_default_row_spacing_unit
 gtk_table_get_homogeneous
 gtk_table_get_row_spacing
+gtk_table_get_row_spacing_unit
 gtk_table_get_col_spacing
+gtk_table_get_col_spacing_unit
 gtk_table_get_default_col_spacing
+gtk_table_get_default_col_spacing_unit
 <SUBSECTION Standard>
 GTK_TABLE
 GTK_IS_TABLE
@@ -3896,18 +3914,24 @@ gtk_text_view_set_overwrite
 gtk_text_view_get_overwrite
 gtk_text_view_set_pixels_above_lines
 gtk_text_view_get_pixels_above_lines
+gtk_text_view_get_pixels_above_lines_unit
 gtk_text_view_set_pixels_below_lines
 gtk_text_view_get_pixels_below_lines
+gtk_text_view_get_pixels_below_lines_unit
 gtk_text_view_set_pixels_inside_wrap
 gtk_text_view_get_pixels_inside_wrap
+gtk_text_view_get_pixels_inside_wrap_unit
 gtk_text_view_set_justification
 gtk_text_view_get_justification
 gtk_text_view_set_left_margin
 gtk_text_view_get_left_margin
+gtk_text_view_get_left_margin_unit
 gtk_text_view_set_right_margin
 gtk_text_view_get_right_margin
+gtk_text_view_get_right_margin_unit
 gtk_text_view_set_indent
 gtk_text_view_get_indent
+gtk_text_view_get_indent_unit
 gtk_text_view_set_tabs
 gtk_text_view_get_tabs
 gtk_text_view_set_accepts_tab
@@ -4632,6 +4656,7 @@ gtk_tree_view_column_set_cell_data_func
 gtk_tree_view_column_clear_attributes
 gtk_tree_view_column_set_spacing
 gtk_tree_view_column_get_spacing
+gtk_tree_view_column_get_spacing_unit
 gtk_tree_view_column_set_visible
 gtk_tree_view_column_get_visible
 gtk_tree_view_column_set_resizable
@@ -4640,11 +4665,14 @@ gtk_tree_view_column_set_sizing
 gtk_tree_view_column_get_sizing
 gtk_tree_view_column_get_width
 gtk_tree_view_column_get_fixed_width
+gtk_tree_view_column_get_fixed_width_unit
 gtk_tree_view_column_set_fixed_width
 gtk_tree_view_column_set_min_width
 gtk_tree_view_column_get_min_width
+gtk_tree_view_column_get_min_width_unit
 gtk_tree_view_column_set_max_width
 gtk_tree_view_column_get_max_width
+gtk_tree_view_column_get_max_width_unit
 gtk_tree_view_column_clicked
 gtk_tree_view_column_set_title
 gtk_tree_view_column_get_title
@@ -4693,6 +4721,7 @@ GtkTreeViewMappingFunc
 GtkTreeViewSearchEqualFunc
 gtk_tree_view_new
 gtk_tree_view_get_level_indentation
+gtk_tree_view_get_level_indentation_unit
 gtk_tree_view_get_show_expanders
 gtk_tree_view_set_level_indentation
 gtk_tree_view_set_show_expanders
@@ -4866,12 +4895,14 @@ GtkCellRendererMode
 GtkCellRenderer
 GtkCellRendererClass
 gtk_cell_renderer_get_size
+gtk_cell_renderer_get_size_unit
 gtk_cell_renderer_render
 gtk_cell_renderer_activate
 gtk_cell_renderer_start_editing
 gtk_cell_renderer_editing_canceled
 gtk_cell_renderer_stop_editing
 gtk_cell_renderer_get_fixed_size
+gtk_cell_renderer_get_fixed_size_unit
 gtk_cell_renderer_set_fixed_size
 
 <SUBSECTION Standard>
@@ -5275,6 +5306,7 @@ gtk_widget_queue_resize
 gtk_widget_queue_resize_no_redraw
 gtk_widget_draw
 gtk_widget_size_request
+gtk_widget_size_request_unit
 gtk_widget_get_child_requisition
 gtk_widget_size_allocate
 gtk_widget_add_accelerator
@@ -5365,8 +5397,11 @@ gtk_widget_class_list_style_properties
 gtk_widget_region_intersect
 gtk_widget_send_expose
 gtk_widget_style_get
+gtk_widget_style_get_unit
 gtk_widget_style_get_property
+gtk_widget_style_get_property_unit
 gtk_widget_style_get_valist
+gtk_widget_style_get_unit_valist
 gtk_widget_get_accessible
 gtk_widget_child_focus
 gtk_widget_child_notify
@@ -6365,7 +6400,9 @@ gtk_icon_set_ref
 gtk_icon_set_render_icon
 gtk_icon_set_unref
 gtk_icon_size_lookup
+gtk_icon_size_lookup_unit
 gtk_icon_size_lookup_for_settings
+gtk_icon_size_lookup_for_settings_unit
 gtk_icon_size_register
 gtk_icon_size_register_alias
 gtk_icon_size_from_name
Index: docs/reference/gtk/tmpl/gtkalignment.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkalignment.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkalignment.sgml	(working copy)
@@ -127,6 +127,18 @@ unused space, from 0 to 1. The values are similar
 @padding_right: 
 
 
+<!-- ##### FUNCTION gtk_alignment_get_padding_unit ##### -->
+<para>
+
+</para>
+
+@alignment: 
+@padding_top: 
+@padding_bottom: 
+@padding_left: 
+@padding_right: 
+
+
 <!-- ##### FUNCTION gtk_alignment_set_padding ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkfilechooser.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkfilechooser.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkfilechooser.sgml	(working copy)
@@ -1237,3 +1237,81 @@ End:
 -->
 
 
+<!-- ##### FUNCTION gtk_file_chooser_get_current_folder_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_get_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_get_files ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_get_preview_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_select_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@file: 
+@error: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_set_current_folder_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@file: 
+@error: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_set_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@file: 
+@error: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_file_chooser_unselect_file ##### -->
+<para>
+
+</para>
+
+@chooser: 
+@file: 
+
+
Index: docs/reference/gtk/tmpl/gtkcellrenderer.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkcellrenderer.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkcellrenderer.sgml	(working copy)
@@ -201,6 +201,20 @@ it cannot be individually modified.
 @height: 
 
 
+<!-- ##### FUNCTION gtk_cell_renderer_get_size_unit ##### -->
+<para>
+
+</para>
+
+@cell: 
+@widget: 
+@cell_area: 
+@x_offset: 
+@y_offset: 
+@width: 
+@height: 
+
+
 <!-- ##### FUNCTION gtk_cell_renderer_render ##### -->
 <para>
 
@@ -272,6 +286,16 @@ it cannot be individually modified.
 @height: 
 
 
+<!-- ##### FUNCTION gtk_cell_renderer_get_fixed_size_unit ##### -->
+<para>
+
+</para>
+
+@cell: 
+@width: 
+@height: 
+
+
 <!-- ##### FUNCTION gtk_cell_renderer_set_fixed_size ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkexpander.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkexpander.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkexpander.sgml	(working copy)
@@ -196,6 +196,15 @@ a &lt;child&gt; type attribute.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_expander_get_spacing_unit ##### -->
+<para>
+
+</para>
+
+@expander: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_expander_set_label ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkadjustment.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkadjustment.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkadjustment.sgml	(working copy)
@@ -201,3 +201,107 @@ changed the #GtkAdjustment value field.
 @adjustment: a #GtkAdjustment
 
 
+<!-- ##### FUNCTION gtk_adjustment_configure ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@value: 
+@lower: 
+@upper: 
+@step_increment: 
+@page_increment: 
+@page_size: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_get_lower ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_get_page_increment ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_get_page_size ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_get_step_increment ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_get_upper ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_set_lower ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@lower: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_set_page_increment ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@page_increment: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_set_page_size ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@page_size: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_set_step_increment ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@step_increment: 
+
+
+<!-- ##### FUNCTION gtk_adjustment_set_upper ##### -->
+<para>
+
+</para>
+
+@adjustment: 
+@upper: 
+
+
Index: docs/reference/gtk/tmpl/gtkiconfactory.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkiconfactory.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkiconfactory.sgml	(working copy)
@@ -293,6 +293,17 @@ This attribute is optional.</para>
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_size_lookup_unit ##### -->
+<para>
+
+</para>
+
+@size: 
+@width: 
+@height: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_size_lookup_for_settings ##### -->
 <para>
 
@@ -305,6 +316,18 @@ This attribute is optional.</para>
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_size_lookup_for_settings_unit ##### -->
+<para>
+
+</para>
+
+@settings: 
+@size: 
+@width: 
+@height: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_size_register ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkcontainer.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkcontainer.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkcontainer.sgml	(working copy)
@@ -475,6 +475,15 @@ Does the same as gtk_container_get_children().
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_container_get_border_width_unit ##### -->
+<para>
+
+</para>
+
+@container: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_container_set_border_width ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkiconview.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkiconview.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkiconview.sgml	(working copy)
@@ -419,6 +419,15 @@ selected rows.  It will be called on every selecte
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_view_get_item_width_unit ##### -->
+<para>
+
+</para>
+
+@icon_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_view_set_spacing ##### -->
 <para>
 
@@ -437,6 +446,15 @@ selected rows.  It will be called on every selecte
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_view_get_spacing_unit ##### -->
+<para>
+
+</para>
+
+@icon_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_view_set_row_spacing ##### -->
 <para>
 
@@ -455,6 +473,15 @@ selected rows.  It will be called on every selecte
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_view_get_row_spacing_unit ##### -->
+<para>
+
+</para>
+
+@icon_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_view_set_column_spacing ##### -->
 <para>
 
@@ -473,6 +500,15 @@ selected rows.  It will be called on every selecte
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_view_get_column_spacing_unit ##### -->
+<para>
+
+</para>
+
+@icon_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_view_set_margin ##### -->
 <para>
 
@@ -491,6 +527,15 @@ selected rows.  It will be called on every selecte
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_icon_view_get_margin_unit ##### -->
+<para>
+
+</para>
+
+@icon_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_icon_view_select_path ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkbox.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkbox.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkbox.sgml	(working copy)
@@ -244,6 +244,15 @@ application.)
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_box_get_spacing_unit ##### -->
+<para>
+
+</para>
+
+@box: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_box_set_spacing ##### -->
 <para>
 
@@ -276,6 +285,19 @@ application.)
 @pack_type: 
 
 
+<!-- ##### FUNCTION gtk_box_query_child_packing_unit ##### -->
+<para>
+
+</para>
+
+@box: 
+@child: 
+@expand: 
+@fill: 
+@padding: 
+@pack_type: 
+
+
 <!-- ##### FUNCTION gtk_box_set_child_packing ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkmisc.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkmisc.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkmisc.sgml	(working copy)
@@ -125,3 +125,13 @@ in pixels.
 @ypad: 
 
 
+<!-- ##### FUNCTION gtk_misc_get_padding_unit ##### -->
+<para>
+
+</para>
+
+@misc: 
+@xpad: 
+@ypad: 
+
+
Index: docs/reference/gtk/tmpl/gtk-unused.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtk-unused.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtk-unused.sgml	(working copy)
@@ -3694,6 +3694,15 @@ fundamental type.
 @window: 
 @Returns: 
 
+<!-- ##### FUNCTION gtk_window_get_default_size_unit ##### -->
+<para>
+
+</para>
+
+@window: 
+@width: 
+@height: 
+
 <!-- ##### FUNCTION gtk_window_get_resizeable ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtktreeviewcolumn.sgml	(working copy)
@@ -263,6 +263,15 @@ calling gtk_tree_view_column_set_cell_data_func()
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_column_get_spacing_unit ##### -->
+<para>
+
+</para>
+
+@tree_column: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_column_set_visible ##### -->
 <para>
 
@@ -335,6 +344,15 @@ calling gtk_tree_view_column_set_cell_data_func()
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_column_get_fixed_width_unit ##### -->
+<para>
+
+</para>
+
+@tree_column: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_column_set_fixed_width ##### -->
 <para>
 
@@ -362,6 +380,15 @@ calling gtk_tree_view_column_set_cell_data_func()
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_column_get_min_width_unit ##### -->
+<para>
+
+</para>
+
+@tree_column: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_column_set_max_width ##### -->
 <para>
 
@@ -380,6 +407,15 @@ calling gtk_tree_view_column_set_cell_data_func()
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_column_get_max_width_unit ##### -->
+<para>
+
+</para>
+
+@tree_column: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_column_clicked ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtktextview.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtktextview.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtktextview.sgml	(working copy)
@@ -675,6 +675,15 @@ multiple views.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_text_view_get_pixels_above_lines_unit ##### -->
+<para>
+
+</para>
+
+@text_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_text_view_set_pixels_below_lines ##### -->
 <para>
 
@@ -693,6 +702,15 @@ multiple views.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_text_view_get_pixels_below_lines_unit ##### -->
+<para>
+
+</para>
+
+@text_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_text_view_set_pixels_inside_wrap ##### -->
 <para>
 
@@ -711,6 +729,15 @@ multiple views.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_text_view_get_pixels_inside_wrap_unit ##### -->
+<para>
+
+</para>
+
+@text_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_text_view_set_justification ##### -->
 <para>
 
@@ -747,6 +774,15 @@ multiple views.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_text_view_get_left_margin_unit ##### -->
+<para>
+
+</para>
+
+@text_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_text_view_set_right_margin ##### -->
 <para>
 
@@ -765,6 +801,15 @@ multiple views.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_text_view_get_right_margin_unit ##### -->
+<para>
+
+</para>
+
+@text_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_text_view_set_indent ##### -->
 <para>
 
@@ -783,6 +828,15 @@ multiple views.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_text_view_get_indent_unit ##### -->
+<para>
+
+</para>
+
+@text_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_text_view_set_tabs ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtktreeview.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtktreeview.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtktreeview.sgml	(working copy)
@@ -459,6 +459,15 @@ has some similarity to strcmp() returning 0 for eq
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_tree_view_get_level_indentation_unit ##### -->
+<para>
+
+</para>
+
+@tree_view: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_tree_view_get_show_expanders ##### -->
 <para>
 
Index: docs/reference/gtk/tmpl/gtkobject.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkobject.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkobject.sgml	(working copy)
@@ -504,3 +504,23 @@ Useless deprecated macro. Ignore it.
 
 
 
+<!-- ##### FUNCTION gtk_object_get_unit ##### -->
+<para>
+
+</para>
+
+@object: 
+@first_property_name: 
+@Varargs: 
+
+
+<!-- ##### FUNCTION gtk_object_get_unit_valist ##### -->
+<para>
+
+</para>
+
+@object: 
+@first_property_name: 
+@var_args: 
+
+
Index: docs/reference/gtk/tmpl/gtkimage.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkimage.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkimage.sgml	(working copy)
@@ -515,3 +515,12 @@ Gets the #GtkImage.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_image_get_pixel_size_unit ##### -->
+<para>
+
+</para>
+
+@image: 
+@Returns: 
+
+
Index: docs/reference/gtk/tmpl/gtktable.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtktable.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtktable.sgml	(working copy)
@@ -282,6 +282,15 @@ to %FALSE if this is not your desired behaviour.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_table_get_default_row_spacing_unit ##### -->
+<para>
+
+</para>
+
+@table: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_table_get_homogeneous ##### -->
 <para>
 
@@ -301,6 +310,16 @@ to %FALSE if this is not your desired behaviour.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_table_get_row_spacing_unit ##### -->
+<para>
+
+</para>
+
+@table: 
+@row: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_table_get_col_spacing ##### -->
 <para>
 
@@ -311,6 +330,16 @@ to %FALSE if this is not your desired behaviour.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_table_get_col_spacing_unit ##### -->
+<para>
+
+</para>
+
+@table: 
+@column: 
+@Returns: 
+
+
 <!-- ##### FUNCTION gtk_table_get_default_col_spacing ##### -->
 <para>
 
@@ -320,3 +349,12 @@ to %FALSE if this is not your desired behaviour.
 @Returns: 
 
 
+<!-- ##### FUNCTION gtk_table_get_default_col_spacing_unit ##### -->
+<para>
+
+</para>
+
+@table: 
+@Returns: 
+
+
Index: docs/reference/gtk/tmpl/gtkwidget.sgml
===================================================================
--- docs/reference/gtk/tmpl/gtkwidget.sgml	(revision 21028)
+++ docs/reference/gtk/tmpl/gtkwidget.sgml	(working copy)
@@ -632,6 +632,13 @@ internal child "accessible" of a <structname>GtkWi
 @widget: the object which received the signal.
 @previous_style: 
 
+<!-- ##### SIGNAL GtkWidget::unit-changed ##### -->
+<para>
+
+</para>
+
+@widget: the object which received the signal.
+
 <!-- ##### SIGNAL GtkWidget::unmap ##### -->
 <para>
 
@@ -2251,6 +2258,16 @@ This function is not useful for applications.
 @Varargs: 
 
 
+<!-- ##### FUNCTION gtk_widget_style_get_unit ##### -->
+<para>
+
+</para>
+
+@widget: 
+@first_property_name: 
+@Varargs: 
+
+
 <!-- ##### FUNCTION gtk_widget_style_get_property ##### -->
 <para>
 
@@ -2261,6 +2278,16 @@ This function is not useful for applications.
 @value: 
 
 
+<!-- ##### FUNCTION gtk_widget_style_get_property_unit ##### -->
+<para>
+
+</para>
+
+@widget: 
+@property_name: 
+@value: 
+
+
 <!-- ##### FUNCTION gtk_widget_style_get_valist ##### -->
 <para>
 
@@ -2271,6 +2298,16 @@ This function is not useful for applications.
 @var_args: 
 
 
+<!-- ##### FUNCTION gtk_widget_style_get_unit_valist ##### -->
+<para>
+
+</para>
+
+@widget: 
+@first_property_name: 
+@var_args: 
+
+
 <!-- ##### FUNCTION gtk_widget_get_accessible ##### -->
 <para>
 
Index: demos/gtk-demo/dialog.c
===================================================================
--- demos/gtk-demo/dialog.c	(revision 21028)
+++ demos/gtk-demo/dialog.c	(working copy)
@@ -51,16 +51,16 @@ interactive_dialog_clicked (GtkButton *button,
                                         GTK_RESPONSE_CANCEL,
 					NULL);
 
-  hbox = gtk_hbox_new (FALSE, 8);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (8));
   gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
 
   stock = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
   gtk_box_pack_start (GTK_BOX (hbox), stock, FALSE, FALSE, 0);
 
   table = gtk_table_new (2, 2, FALSE);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 4);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+  gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (4));
+  gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (4));
   gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
   label = gtk_label_new_with_mnemonic ("_Entry 1");
   gtk_table_attach_defaults (GTK_TABLE (table),
@@ -112,17 +112,17 @@ do_dialog (GtkWidget *do_widget)
       gtk_window_set_title (GTK_WINDOW (window), "Dialogs");
 
       g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
-      gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (8));
 
       frame = gtk_frame_new ("Dialogs");
       gtk_container_add (GTK_CONTAINER (window), frame);
 
-      vbox = gtk_vbox_new (FALSE, 8);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (frame), vbox);
 
       /* Standard message dialog */
-      hbox = gtk_hbox_new (FALSE, 8);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
       button = gtk_button_new_with_mnemonic ("_Message Dialog");
       g_signal_connect (button, "clicked",
@@ -132,7 +132,7 @@ do_dialog (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
 
       /* Interactive dialog*/
-      hbox = gtk_hbox_new (FALSE, 8);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
       vbox2 = gtk_vbox_new (FALSE, 0);
 
@@ -143,8 +143,8 @@ do_dialog (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
 
       table = gtk_table_new (2, 2, FALSE);
-      gtk_table_set_row_spacings (GTK_TABLE (table), 4);
-      gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+      gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (4));
+      gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (4));
       gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
 
       label = gtk_label_new_with_mnemonic ("_Entry 1");
Index: demos/gtk-demo/pickers.c
===================================================================
--- demos/gtk-demo/pickers.c	(revision 21028)
+++ demos/gtk-demo/pickers.c	(working copy)
@@ -23,14 +23,14 @@ do_pickers (GtkWidget *do_widget)
                       G_CALLBACK (gtk_widget_destroyed),
                       &window);
     
-    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (10));
 
     table = gtk_table_new (4, 2, FALSE);    
-    gtk_table_set_col_spacing (GTK_TABLE (table), 0, 10);
-    gtk_table_set_row_spacings (GTK_TABLE (table), 3);
+    gtk_table_set_col_spacing (GTK_TABLE (table), 0, GDK_UNIT_ONE_TWELFTH_EM (10));
+    gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (3));
     gtk_container_add (GTK_CONTAINER (window), table);
 
-    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (table), GDK_UNIT_ONE_TWELFTH_EM (10));
 
     label = gtk_label_new ("Color:");
     gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
Index: demos/gtk-demo/textscroll.c
===================================================================
--- demos/gtk-demo/textscroll.c	(revision 21028)
+++ demos/gtk-demo/textscroll.c	(working copy)
@@ -182,9 +182,9 @@ do_textscroll (GtkWidget *do_widget)
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
       g_signal_connect (window, "destroy",
 			G_CALLBACK (gtk_widget_destroyed), &window);
-      gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
+      gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (600), GDK_UNIT_ONE_TWELFTH_EM (400));
       
-      hbox = gtk_hbox_new (TRUE, 6);
+      hbox = gtk_hbox_new (TRUE, GDK_UNIT_ONE_TWELFTH_EM (6));
       gtk_container_add (GTK_CONTAINER (window), hbox);
 
       create_text_view (hbox, TRUE);
Index: demos/gtk-demo/ui_manager.c
===================================================================
--- demos/gtk-demo/ui_manager.c	(revision 21028)
+++ demos/gtk-demo/ui_manager.c	(working copy)
@@ -204,7 +204,7 @@ do_ui_manager (GtkWidget *do_widget)
 			  FALSE, FALSE, 0);
 
       label = gtk_label_new ("Type\n<alt>\nto start");
-      gtk_widget_set_size_request (label, 200, 200);
+      gtk_widget_set_size_request (label, GDK_UNIT_ONE_TWELFTH_EM (200), GDK_UNIT_ONE_TWELFTH_EM (200));
       gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
       gtk_box_pack_start (GTK_BOX (box1), label, TRUE, TRUE, 0);
 
@@ -213,8 +213,8 @@ do_ui_manager (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (box1), separator, FALSE, TRUE, 0);
 
 
-      box2 = gtk_vbox_new (FALSE, 10);
-      gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+      box2 = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (10));
+      gtk_container_set_border_width (GTK_CONTAINER (box2), GDK_UNIT_ONE_TWELFTH_EM (10));
       gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
 
       button = gtk_button_new_with_label ("close");
Index: demos/gtk-demo/changedisplay.c
===================================================================
--- demos/gtk-demo/changedisplay.c	(revision 21028)
+++ demos/gtk-demo/changedisplay.c	(working copy)
@@ -354,8 +354,8 @@ create_frame (ChangeDisplayInfo *info,
   
   *frame = gtk_frame_new (title);
 
-  hbox = gtk_hbox_new (FALSE, 8);
-  gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
+  hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+  gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (8));
   gtk_container_add (GTK_CONTAINER (*frame), hbox);
 
   scrollwin = gtk_scrolled_window_new (NULL, NULL);
@@ -372,7 +372,7 @@ create_frame (ChangeDisplayInfo *info,
   selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (*tree_view));
   gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
 
-  *button_vbox = gtk_vbox_new (FALSE, 5);
+  *button_vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_box_pack_start (GTK_BOX (hbox), *button_vbox, FALSE, FALSE, 0);
 
   if (!info->size_group)
@@ -611,15 +611,15 @@ do_changedisplay (GtkWidget *do_widget)
 					    "Change",         GTK_RESPONSE_OK,
 					    NULL);
 
-      gtk_window_set_default_size (GTK_WINDOW (info->window), 300, 400);
+      gtk_window_set_default_size (GTK_WINDOW (info->window), GDK_UNIT_ONE_TWELFTH_EM (300), GDK_UNIT_ONE_TWELFTH_EM (400));
 
       g_signal_connect (info->window, "response",
 			G_CALLBACK (response_cb), info);
       g_signal_connect (info->window, "destroy",
 			G_CALLBACK (destroy_cb), &info);
 
-      vbox = gtk_vbox_new (FALSE, 5);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
 	
       gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->window)->vbox), vbox,
 			  TRUE, TRUE, 0);
Index: demos/gtk-demo/tree_store.c
===================================================================
--- demos/gtk-demo/tree_store.c	(revision 21028)
+++ demos/gtk-demo/tree_store.c	(working copy)
@@ -291,7 +291,7 @@ add_columns (GtkTreeView *treeview)
   column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
   gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
 				   GTK_TREE_VIEW_COLUMN_FIXED);
-  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GDK_UNIT_ONE_TWELFTH_EM (50));
   gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
   /* havoc column */
@@ -313,7 +313,7 @@ add_columns (GtkTreeView *treeview)
   column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
   gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
 				   GTK_TREE_VIEW_COLUMN_FIXED);
-  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GDK_UNIT_ONE_TWELFTH_EM (50));
   gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
   /* tim column */
@@ -336,7 +336,7 @@ add_columns (GtkTreeView *treeview)
   column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
   gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
 				   GTK_TREE_VIEW_COLUMN_FIXED);
-  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GDK_UNIT_ONE_TWELFTH_EM (50));
   gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
   /* owen column */
@@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview)
   column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
   gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
 				   GTK_TREE_VIEW_COLUMN_FIXED);
-  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GDK_UNIT_ONE_TWELFTH_EM (50));
   gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 
   /* dave column */
@@ -380,7 +380,7 @@ add_columns (GtkTreeView *treeview)
   column = gtk_tree_view_get_column (GTK_TREE_VIEW (treeview), col_offset - 1);
   gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
 				   GTK_TREE_VIEW_COLUMN_FIXED);
-  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
+  gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), GDK_UNIT_ONE_TWELFTH_EM (50));
   gtk_tree_view_column_set_clickable (GTK_TREE_VIEW_COLUMN (column), TRUE);
 }
 
@@ -402,8 +402,8 @@ do_tree_store (GtkWidget *do_widget)
       g_signal_connect (window, "destroy",
 			G_CALLBACK (gtk_widget_destroyed), &window);
 
-      vbox = gtk_vbox_new (FALSE, 8);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
       gtk_box_pack_start (GTK_BOX (vbox),
@@ -435,7 +435,7 @@ do_tree_store (GtkWidget *do_widget)
       /* expand all rows after the treeview widget has been realized */
       g_signal_connect (treeview, "realize",
 			G_CALLBACK (gtk_tree_view_expand_all), NULL);
-      gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
+      gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (50), GDK_UNIT_ONE_TWELFTH_EM (400));
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
Index: demos/gtk-demo/demo.ui
===================================================================
--- demos/gtk-demo/demo.ui	(revision 21028)
+++ demos/gtk-demo/demo.ui	(working copy)
@@ -148,8 +148,8 @@
 	 </accessibility>
     </object>
     <object class="GtkWindow" id="window1">
-        <property name="default_height">250</property>
-        <property name="default_width">440</property>
+        <property name="default_height">25em</property>
+        <property name="default_width">44em</property>
         <property name="title">GtkBuilder demo</property>
         <child>
             <object class="GtkVBox" id="vbox1">
Index: demos/gtk-demo/iconview.c
===================================================================
--- demos/gtk-demo/iconview.c	(revision 21028)
+++ demos/gtk-demo/iconview.c	(working copy)
@@ -263,7 +263,7 @@ do_iconview (GtkWidget *do_widget)
       GError *error;
             
       window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-      gtk_window_set_default_size (GTK_WINDOW (window), 650, 400);
+      gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (50), GDK_UNIT_ONE_TWELFTH_EM (400));
       
       gtk_window_set_screen (GTK_WINDOW (window),
 			     gtk_widget_get_screen (do_widget));
Index: demos/gtk-demo/stock_browser.c
===================================================================
--- demos/gtk-demo/stock_browser.c	(revision 21028)
+++ demos/gtk-demo/stock_browser.c	(working copy)
@@ -420,12 +420,12 @@ do_stock_browser (GtkWidget *do_widget)
       gtk_window_set_screen (GTK_WINDOW (window),
 			     gtk_widget_get_screen (do_widget));
       gtk_window_set_title (GTK_WINDOW (window), "Stock Icons and Items");
-      gtk_window_set_default_size (GTK_WINDOW (window), -1, 500);
+      gtk_window_set_default_size (GTK_WINDOW (window), -1, GDK_UNIT_ONE_TWELFTH_EM (500));
 
       g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
-      gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (8));
 
-      hbox = gtk_hbox_new (FALSE, 8);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (window), hbox);
 
       sw = gtk_scrolled_window_new (NULL, NULL);
@@ -494,8 +494,8 @@ do_stock_browser (GtkWidget *do_widget)
       frame = gtk_frame_new ("Selected Item");
       gtk_container_add (GTK_CONTAINER (align), frame);
 
-      vbox = gtk_vbox_new (FALSE, 8);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 4);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (4));
       gtk_container_add (GTK_CONTAINER (frame), vbox);
 
       display = g_new (StockItemDisplay, 1);
Index: demos/gtk-demo/list_store.c
===================================================================
--- demos/gtk-demo/list_store.c	(revision 21028)
+++ demos/gtk-demo/list_store.c	(working copy)
@@ -173,9 +173,9 @@ do_list_store (GtkWidget *do_widget)
 
       g_signal_connect (window, "destroy",
 			G_CALLBACK (gtk_widget_destroyed), &window);
-      gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (8));
 
-      vbox = gtk_vbox_new (FALSE, 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
       label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
@@ -206,7 +206,7 @@ do_list_store (GtkWidget *do_widget)
       add_columns (GTK_TREE_VIEW (treeview));
 
       /* finish & show */
-      gtk_window_set_default_size (GTK_WINDOW (window), 280, 250);
+      gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (280), GDK_UNIT_ONE_TWELFTH_EM (250));
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
Index: demos/gtk-demo/sizegroup.c
===================================================================
--- demos/gtk-demo/sizegroup.c	(revision 21028)
+++ demos/gtk-demo/sizegroup.c	(working copy)
@@ -115,9 +115,9 @@ do_sizegroup (GtkWidget *do_widget)
       g_signal_connect (window, "destroy",
 			G_CALLBACK (gtk_widget_destroyed), &window);
 
-      vbox = gtk_vbox_new (FALSE, 5);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
       gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
 
       size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
       
@@ -127,9 +127,9 @@ do_sizegroup (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
 
       table = gtk_table_new (2, 2, FALSE);
-      gtk_container_set_border_width (GTK_CONTAINER (table), 5);
-      gtk_table_set_row_spacings (GTK_TABLE (table), 5);
-      gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+      gtk_container_set_border_width (GTK_CONTAINER (table), GDK_UNIT_ONE_TWELFTH_EM (5));
+      gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (5));
+      gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (10));
       gtk_container_add (GTK_CONTAINER (frame), table);
 
       add_row (GTK_TABLE (table), 0, size_group, "_Foreground", color_options);
@@ -141,9 +141,9 @@ do_sizegroup (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
 
       table = gtk_table_new (2, 2, FALSE);
-      gtk_container_set_border_width (GTK_CONTAINER (table), 5);
-      gtk_table_set_row_spacings (GTK_TABLE (table), 5);
-      gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+      gtk_container_set_border_width (GTK_CONTAINER (table), GDK_UNIT_ONE_TWELFTH_EM (5));
+      gtk_table_set_row_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (5));
+      gtk_table_set_col_spacings (GTK_TABLE (table), GDK_UNIT_ONE_TWELFTH_EM (10));
       gtk_container_add (GTK_CONTAINER (frame), table);
 
       add_row (GTK_TABLE (table), 0, size_group, "_Dashing", dash_options);
Index: demos/gtk-demo/editable_cells.c
===================================================================
--- demos/gtk-demo/editable_cells.c	(revision 21028)
+++ demos/gtk-demo/editable_cells.c	(working copy)
@@ -328,11 +328,11 @@ do_editable_cells (GtkWidget *do_widget)
       gtk_window_set_screen (GTK_WINDOW (window),
                              gtk_widget_get_screen (do_widget));
       gtk_window_set_title (GTK_WINDOW (window), "Shopping list");
-      gtk_container_set_border_width (GTK_CONTAINER (window), 5);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (5));
       g_signal_connect (window, "destroy",
                         G_CALLBACK (gtk_widget_destroyed), &window);
 
-      vbox = gtk_vbox_new (FALSE, 5);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
       gtk_box_pack_start (GTK_BOX (vbox),
@@ -365,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
       gtk_container_add (GTK_CONTAINER (sw), treeview);
 
       /* some buttons */
-      hbox = gtk_hbox_new (TRUE, 4);
+      hbox = gtk_hbox_new (TRUE, GDK_UNIT_ONE_TWELFTH_EM (4));
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
       button = gtk_button_new_with_label ("Add item");
@@ -378,7 +378,7 @@ do_editable_cells (GtkWidget *do_widget)
                         G_CALLBACK (remove_item), treeview);
       gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
 
-      gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
+      gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (320), GDK_UNIT_ONE_TWELFTH_EM (200));
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
Index: demos/gtk-demo/clipboard.c
===================================================================
--- demos/gtk-demo/clipboard.c	(revision 21028)
+++ demos/gtk-demo/clipboard.c	(working copy)
@@ -207,7 +207,7 @@ do_clipboard (GtkWidget *do_widget)
                         G_CALLBACK (gtk_widget_destroyed), &window);
 
       vbox = gtk_vbox_new (FALSE, 0);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
@@ -215,8 +215,8 @@ do_clipboard (GtkWidget *do_widget)
       
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
-      hbox = gtk_hbox_new (FALSE, 4);
-      gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (4));
+      gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
       /* Create the first entry */
@@ -232,8 +232,8 @@ do_clipboard (GtkWidget *do_widget)
       label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
-      hbox = gtk_hbox_new (FALSE, 4);
-      gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (4));
+      gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
       /* Create the second entry */
@@ -249,8 +249,8 @@ do_clipboard (GtkWidget *do_widget)
       label = gtk_label_new ("Images can be transferred via the clipboard, too");
       gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 
-      hbox = gtk_hbox_new (FALSE, 4);
-      gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
+      hbox = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (4));
+      gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 
       /* Create the first image */
Index: demos/gtk-demo/images.c
===================================================================
--- demos/gtk-demo/images.c	(revision 21028)
+++ demos/gtk-demo/images.c	(working copy)
@@ -332,10 +332,10 @@ do_images (GtkWidget *do_widget)
       g_signal_connect (window, "destroy",
 			G_CALLBACK (cleanup_callback), NULL);
 
-      gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (8));
 
-      vbox = gtk_vbox_new (FALSE, 8);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
       label = gtk_label_new (NULL);
Index: demos/gtk-demo/expander.c
===================================================================
--- demos/gtk-demo/expander.c	(revision 21028)
+++ demos/gtk-demo/expander.c	(working copy)
@@ -32,9 +32,9 @@ do_expander (GtkWidget *do_widget)
     g_signal_connect (window, "destroy",
 		      G_CALLBACK (gtk_widget_destroyed), &window);
 
-    vbox = gtk_vbox_new (FALSE, 5);
+    vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
     gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
 
     label = gtk_label_new ("Expander demo. Click on the triangle for details.");
     gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
Index: demos/gtk-demo/panes.c
===================================================================
--- demos/gtk-demo/panes.c	(revision 21028)
+++ demos/gtk-demo/panes.c	(working copy)
@@ -65,7 +65,7 @@ create_pane_options (GtkPaned	 *paned,
   GtkWidget *check_button;
   
   frame = gtk_frame_new (frame_label);
-  gtk_container_set_border_width (GTK_CONTAINER (frame), 4);
+  gtk_container_set_border_width (GTK_CONTAINER (frame), GDK_UNIT_ONE_TWELFTH_EM (4));
   
   table = gtk_table_new (3, 2, TRUE);
   gtk_container_add (GTK_CONTAINER (frame), table);
@@ -138,14 +138,14 @@ do_panes (GtkWidget *do_widget)
       
       vpaned = gtk_vpaned_new ();
       gtk_box_pack_start (GTK_BOX (vbox), vpaned, TRUE, TRUE, 0);
-      gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
+      gtk_container_set_border_width (GTK_CONTAINER(vpaned), GDK_UNIT_ONE_TWELFTH_EM (5));
 
       hpaned = gtk_hpaned_new ();
       gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
 
       frame = gtk_frame_new (NULL);
       gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
-      gtk_widget_set_size_request (frame, 60, 60);
+      gtk_widget_set_size_request (frame, GDK_UNIT_ONE_TWELFTH_EM (60), GDK_UNIT_ONE_TWELFTH_EM (60));
       gtk_paned_add1 (GTK_PANED (hpaned), frame);
       
       button = gtk_button_new_with_mnemonic ("_Hi there");
@@ -153,12 +153,12 @@ do_panes (GtkWidget *do_widget)
 
       frame = gtk_frame_new (NULL);
       gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
-      gtk_widget_set_size_request (frame, 80, 60);
+      gtk_widget_set_size_request (frame, GDK_UNIT_ONE_TWELFTH_EM (80), GDK_UNIT_ONE_TWELFTH_EM (60));
       gtk_paned_add2 (GTK_PANED (hpaned), frame);
 
       frame = gtk_frame_new (NULL);
       gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
-      gtk_widget_set_size_request (frame, 60, 80);
+      gtk_widget_set_size_request (frame, GDK_UNIT_ONE_TWELFTH_EM (60), GDK_UNIT_ONE_TWELFTH_EM (80));
       gtk_paned_add2 (GTK_PANED (vpaned), frame);
 
       /* Now create toggle buttons to control sizing */
Index: demos/gtk-demo/rotated_text.c
===================================================================
--- demos/gtk-demo/rotated_text.c	(revision 21028)
+++ demos/gtk-demo/rotated_text.c	(working copy)
@@ -125,7 +125,8 @@ do_rotated_text (GtkWidget *do_widget)
       g_signal_connect (drawing_area, "expose-event",
 			G_CALLBACK (rotated_text_expose_event), NULL);
 
-      gtk_window_set_default_size (GTK_WINDOW (window), 2 * RADIUS, 2 * RADIUS);
+      gtk_window_set_default_size (GTK_WINDOW (window),
+                                   GDK_UNIT_EM ((2 * RADIUS)/10), GDK_UNIT_EM ((2 * RADIUS)/10));
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
Index: demos/gtk-demo/appwindow.c
===================================================================
--- demos/gtk-demo/appwindow.c	(revision 21028)
+++ demos/gtk-demo/appwindow.c	(working copy)
@@ -537,7 +537,7 @@ do_appwindow (GtkWidget *do_widget)
                         0,                      0);
 
       gtk_window_set_default_size (GTK_WINDOW (window),
-                                   200, 200);
+                                   GDK_UNIT_ONE_TWELFTH_EM (200), GDK_UNIT_ONE_TWELFTH_EM (200));
       
       contents = gtk_text_view_new ();
       gtk_widget_grab_focus (contents);
Index: demos/gtk-demo/combobox.c
===================================================================
--- demos/gtk-demo/combobox.c	(revision 21028)
+++ demos/gtk-demo/combobox.c	(working copy)
@@ -343,9 +343,9 @@ do_combobox (GtkWidget *do_widget)
                       G_CALLBACK (gtk_widget_destroyed),
                       &window);
     
-    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (10));
 
-    vbox = gtk_vbox_new (FALSE, 2);
+    vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (2));
     gtk_container_add (GTK_CONTAINER (window), vbox);
 
     /* A combobox demonstrating cell renderers, separators and
@@ -355,7 +355,7 @@ do_combobox (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
     
     box = gtk_vbox_new (FALSE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (box), 5);
+    gtk_container_set_border_width (GTK_CONTAINER (box), GDK_UNIT_ONE_TWELFTH_EM (5));
     gtk_container_add (GTK_CONTAINER (frame), box);
     
     model = create_stock_icon_store ();
@@ -396,7 +396,7 @@ do_combobox (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
 
     box = gtk_vbox_new (FALSE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (box), 5);
+    gtk_container_set_border_width (GTK_CONTAINER (box), GDK_UNIT_ONE_TWELFTH_EM (5));
     gtk_container_add (GTK_CONTAINER (frame), box);
     
     model = create_capital_store ();
@@ -425,7 +425,7 @@ do_combobox (GtkWidget *do_widget)
     gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
     
     box = gtk_vbox_new (FALSE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (box), 5);
+    gtk_container_set_border_width (GTK_CONTAINER (box), GDK_UNIT_ONE_TWELFTH_EM (5));
     gtk_container_add (GTK_CONTAINER (frame), box);
     
     combo = gtk_combo_box_entry_new_text ();
Index: demos/gtk-demo/assistant.c
===================================================================
--- demos/gtk-demo/assistant.c	(revision 21028)
+++ demos/gtk-demo/assistant.c	(working copy)
@@ -64,8 +64,8 @@ create_page1 (GtkWidget *assistant)
   GtkWidget *box, *label, *entry;
   GdkPixbuf *pixbuf;
 
-  box = gtk_hbox_new (FALSE, 12);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
+  box = gtk_hbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (10));
+  gtk_container_set_border_width (GTK_CONTAINER (box), GDK_UNIT_ONE_TWELFTH_EM (10));
 
   label = gtk_label_new ("You must fill out this entry to continue:");
   gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
@@ -91,8 +91,8 @@ create_page2 (GtkWidget *assistant)
   GtkWidget *box, *checkbutton;
   GdkPixbuf *pixbuf;
 
-  box = gtk_vbox_new (12, FALSE);
-  gtk_container_set_border_width (GTK_CONTAINER (box), 12);
+  box = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (10));
+  gtk_container_set_border_width (GTK_CONTAINER (box), GDK_UNIT_ONE_TWELFTH_EM (10));
 
   checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
 						 "even if you do not check this");
@@ -134,7 +134,7 @@ do_assistant (GtkWidget *do_widget)
     {
       assistant = gtk_assistant_new ();
 
-	 gtk_window_set_default_size (GTK_WINDOW (assistant), -1, 300);
+      gtk_window_set_default_size (GTK_WINDOW (assistant), -1, GDK_UNIT_ONE_TWELFTH_EM (300));
 
       gtk_window_set_screen (GTK_WINDOW (assistant),
 			     gtk_widget_get_screen (do_widget));
Index: demos/gtk-demo/textview.c
===================================================================
--- demos/gtk-demo/textview.c	(revision 21028)
+++ demos/gtk-demo/textview.c	(working copy)
@@ -114,7 +114,7 @@ create_tags (GtkTextBuffer *buffer)
 			      "justification", GTK_JUSTIFY_RIGHT, NULL);
 
   gtk_text_buffer_create_tag (buffer, "wide_margins",
-			      "left_margin", 50, "right_margin", 50,
+			      "left_margin", GDK_UNIT_ONE_TWELFTH_EM (50), "right_margin", GDK_UNIT_ONE_TWELFTH_EM (50),
 			      NULL);
   
   gtk_text_buffer_create_tag (buffer, "strikethrough",
@@ -139,9 +139,9 @@ create_tags (GtkTextBuffer *buffer)
   gtk_text_buffer_create_tag (buffer, "rtl_quote",
 			      "wrap_mode", GTK_WRAP_WORD,
 			      "direction", GTK_TEXT_DIR_RTL,
-			      "indent", 30,
-			      "left_margin", 20,
-			      "right_margin", 20,
+			      "indent", GDK_UNIT_ONE_TWELFTH_EM (30),
+			      "left_margin", GDK_UNIT_ONE_TWELFTH_EM (20),
+			      "right_margin", GDK_UNIT_ONE_TWELFTH_EM (20),
 			      NULL);
 }
 
@@ -173,7 +173,10 @@ insert_text (GtkTextBuffer *buffer)
       exit (1);
     }
 
-  scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
+  scaled = gdk_pixbuf_scale_simple (pixbuf,
+                                    GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (32)),
+                                    GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (32)),
+                                    GDK_INTERP_BILINEAR);
   g_object_unref (pixbuf);
   pixbuf = scaled;
   
@@ -409,7 +412,7 @@ attach_widgets (GtkTextView *text_view)
         {
           widget = gtk_hscale_new (NULL);
           gtk_range_set_range (GTK_RANGE (widget), 0, 100);
-          gtk_widget_set_size_request (widget, 70, -1);
+          gtk_widget_set_size_request (widget, GDK_UNIT_ONE_TWELFTH_EM (70), -1);
         }
       else if (i == 3)
         {
@@ -454,7 +457,7 @@ do_textview (GtkWidget *do_widget)
       gtk_window_set_screen (GTK_WINDOW (window),
 			     gtk_widget_get_screen (do_widget));
       gtk_window_set_default_size (GTK_WINDOW (window),
-				   450, 450);
+				   GDK_UNIT_ONE_TWELFTH_EM (450), GDK_UNIT_ONE_TWELFTH_EM (450));
       
       g_signal_connect (window, "destroy",
 			G_CALLBACK (gtk_widget_destroyed), &window);
@@ -463,7 +466,7 @@ do_textview (GtkWidget *do_widget)
       gtk_container_set_border_width (GTK_CONTAINER (window), 0);
 
       vpaned = gtk_vpaned_new ();
-      gtk_container_set_border_width (GTK_CONTAINER(vpaned), 5);
+      gtk_container_set_border_width (GTK_CONTAINER(vpaned), GDK_UNIT_ONE_TWELFTH_EM (5));
       gtk_container_add (GTK_CONTAINER (window), vpaned);
 
       /* For convenience, we just use the autocreated buffer from
@@ -534,7 +537,7 @@ recursive_attach_view (int                 depth,
   gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color);
 
   align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0);
-  gtk_container_set_border_width (GTK_CONTAINER (align), 1);
+  gtk_container_set_border_width (GTK_CONTAINER (align), GDK_UNIT_ONE_TWELFTH_EM (1));
   
   gtk_container_add (GTK_CONTAINER (event_box), align);
   gtk_container_add (GTK_CONTAINER (align), child_view);
@@ -590,7 +593,7 @@ easter_egg_callback (GtkWidget *button,
   window_ptr = &window;
   g_object_add_weak_pointer (G_OBJECT (window), window_ptr);
 
-  gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
+  gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (300), GDK_UNIT_ONE_TWELFTH_EM (400));
   
   gtk_widget_show_all (window);
 }
Index: demos/gtk-demo/colorsel.c
===================================================================
--- demos/gtk-demo/colorsel.c	(revision 21028)
+++ demos/gtk-demo/colorsel.c	(working copy)
@@ -87,10 +87,10 @@ do_colorsel (GtkWidget *do_widget)
       g_signal_connect (window, "destroy",
 			G_CALLBACK (gtk_widget_destroyed), &window);
 
-      gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (8));
 
-      vbox = gtk_vbox_new (FALSE, 8);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
       /*
@@ -108,7 +108,7 @@ do_colorsel (GtkWidget *do_widget)
 			G_CALLBACK (expose_event_callback), NULL);
 
       /* set a minimum size */
-      gtk_widget_set_size_request (da, 200, 200);
+      gtk_widget_set_size_request (da, GDK_UNIT_ONE_TWELFTH_EM (200), GDK_UNIT_ONE_TWELFTH_EM (200));
       /* set the color */
       gtk_widget_modify_bg (da, GTK_STATE_NORMAL, &color);
       
Index: demos/gtk-demo/button_box.c
===================================================================
--- demos/gtk-demo/button_box.c	(revision 21028)
+++ demos/gtk-demo/button_box.c	(working copy)
@@ -6,10 +6,10 @@
 #include <gtk/gtk.h>
 
 static GtkWidget *
-create_bbox (gint  horizontal,
-	     char *title, 
-	     gint  spacing,
-	     gint  layout)
+create_bbox (gint    horizontal,
+	     char   *title, 
+	     GdkUnit spacing,
+	     gint    layout)
 {
   GtkWidget *frame;
   GtkWidget *bbox;
@@ -22,7 +22,7 @@ static GtkWidget *
   else
     bbox = gtk_vbutton_box_new ();
 
-  gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
+  gtk_container_set_border_width (GTK_CONTAINER (bbox), GDK_UNIT_ONE_TWELFTH_EM (5));
   gtk_container_add (GTK_CONTAINER (frame), bbox);
 
   gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
@@ -61,56 +61,56 @@ do_button_box (GtkWidget *do_widget)
 		      G_CALLBACK (gtk_widget_destroyed),
 		      &window);
     
-    gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (10));
 
     main_vbox = gtk_vbox_new (FALSE, 0);
     gtk_container_add (GTK_CONTAINER (window), main_vbox);
     
     frame_horz = gtk_frame_new ("Horizontal Button Boxes");
-    gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, 10);
+    gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz, TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (10));
     
     vbox = gtk_vbox_new (FALSE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (10));
     gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
 
     gtk_box_pack_start (GTK_BOX (vbox), 
-			create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD),
+			create_bbox (TRUE, "Spread", GDK_UNIT_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_SPREAD),
 			TRUE, TRUE, 0);
 
     gtk_box_pack_start (GTK_BOX (vbox), 
-			create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE),
-			TRUE, TRUE, 5);
+			create_bbox (TRUE, "Edge", GDK_UNIT_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_EDGE),
+			TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
     
     gtk_box_pack_start (GTK_BOX (vbox), 
-			create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START),
-			TRUE, TRUE, 5);
+			create_bbox (TRUE, "Start", GDK_UNIT_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_START),
+			TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
     
     gtk_box_pack_start (GTK_BOX (vbox), 
-			create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END),
-			TRUE, TRUE, 5);
+			create_bbox (TRUE, "End", GDK_UNIT_ONE_TWELFTH_EM (40), GTK_BUTTONBOX_END),
+			TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
 
     frame_vert = gtk_frame_new ("Vertical Button Boxes");
-    gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, 10);
+    gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert, TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (10));
     
     hbox = gtk_hbox_new (FALSE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (hbox), GDK_UNIT_ONE_TWELFTH_EM (10));
     gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
 
     gtk_box_pack_start (GTK_BOX (hbox), 
-			create_bbox (FALSE, "Spread", 30, GTK_BUTTONBOX_SPREAD),
+			create_bbox (FALSE, "Spread", GDK_UNIT_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_SPREAD),
 			TRUE, TRUE, 0);
 
     gtk_box_pack_start (GTK_BOX (hbox), 
-			create_bbox (FALSE, "Edge", 30, GTK_BUTTONBOX_EDGE),
-			TRUE, TRUE, 5);
+			create_bbox (FALSE, "Edge", GDK_UNIT_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_EDGE),
+			TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
 
     gtk_box_pack_start (GTK_BOX (hbox), 
-			create_bbox (FALSE, "Start", 30, GTK_BUTTONBOX_START),
-			TRUE, TRUE, 5);
+			create_bbox (FALSE, "Start", GDK_UNIT_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_START),
+			TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
 
     gtk_box_pack_start (GTK_BOX (hbox), 
-			create_bbox (FALSE, "End", 30, GTK_BUTTONBOX_END),
-			TRUE, TRUE, 5);
+			create_bbox (FALSE, "End", GDK_UNIT_ONE_TWELFTH_EM (30), GTK_BUTTONBOX_END),
+			TRUE, TRUE, GDK_UNIT_ONE_TWELFTH_EM (5));
   }
 
   if (!GTK_WIDGET_VISIBLE (window))
Index: demos/gtk-demo/drawingarea.c
===================================================================
--- demos/gtk-demo/drawingarea.c	(revision 21028)
+++ demos/gtk-demo/drawingarea.c	(working copy)
@@ -245,10 +245,10 @@ do_drawingarea (GtkWidget *do_widget)
 
       g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
 
-      gtk_container_set_border_width (GTK_CONTAINER (window), 8);
+      gtk_container_set_border_width (GTK_CONTAINER (window), GDK_UNIT_ONE_TWELFTH_EM (8));
 
-      vbox = gtk_vbox_new (FALSE, 8);
-      gtk_container_set_border_width (GTK_CONTAINER (vbox), 8);
+      vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (8));
+      gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (8));
       gtk_container_add (GTK_CONTAINER (window), vbox);
 
       /*
@@ -266,7 +266,7 @@ do_drawingarea (GtkWidget *do_widget)
       
       da = gtk_drawing_area_new ();
       /* set a minimum size */
-      gtk_widget_set_size_request (da, 100, 100);
+      gtk_widget_set_size_request (da, GDK_UNIT_ONE_TWELFTH_EM (100), GDK_UNIT_ONE_TWELFTH_EM (100));
 
       gtk_container_add (GTK_CONTAINER (frame), da);
 
@@ -288,7 +288,7 @@ do_drawingarea (GtkWidget *do_widget)
       
       da = gtk_drawing_area_new ();
       /* set a minimum size */
-      gtk_widget_set_size_request (da, 100, 100);
+      gtk_widget_set_size_request (da, GDK_UNIT_ONE_TWELFTH_EM (100), GDK_UNIT_ONE_TWELFTH_EM (100));
 
       gtk_container_add (GTK_CONTAINER (frame), da);
 
Index: demos/gtk-demo/main.c
===================================================================
--- demos/gtk-demo/main.c	(revision 21028)
+++ demos/gtk-demo/main.c	(working copy)
@@ -764,9 +764,9 @@ create_text (GtkTextBuffer **buffer,
       gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (text_view),
                                    GTK_WRAP_WORD);
       gtk_text_view_set_pixels_above_lines (GTK_TEXT_VIEW (text_view),
-                                            2);
+                                            GDK_UNIT_ONE_TWELFTH_EM (2));
       gtk_text_view_set_pixels_below_lines (GTK_TEXT_VIEW (text_view),
-                                            2);
+                                            GDK_UNIT_ONE_TWELFTH_EM (2));
     }
   
   return scrolled_window;
@@ -792,7 +792,7 @@ create_tree (void)
 
   gtk_tree_selection_set_mode (GTK_TREE_SELECTION (selection),
 			       GTK_SELECTION_BROWSE);
-  gtk_widget_set_size_request (tree_view, 200, -1);
+  gtk_widget_set_size_request (tree_view, GDK_UNIT_ONE_TWELFTH_EM (200), -1);
 
   /* this code only supports 1 level of children. If we
    * want more we probably have to use a recursing function.
@@ -946,6 +946,7 @@ main (int argc, char **argv)
     }
   /* -- End of hack -- */
   
+  gdk_unit_enable_resolution_independence ();
   gtk_init (&argc, &argv);
 
   setup_default_icon ();
@@ -969,7 +970,7 @@ main (int argc, char **argv)
 			    gtk_label_new_with_mnemonic ("_Info"));
 
   tag = gtk_text_buffer_create_tag (info_buffer, "title",
-                                    "font", "Sans 18",
+                                    "scale", PANGO_SCALE_XX_LARGE,
                                     NULL);
    g_object_unref (info_buffer);
 
@@ -999,9 +1000,9 @@ main (int argc, char **argv)
 				    "weight", PANGO_WEIGHT_BOLD,
  				    "foreground", "DarkGoldenrod4",
                                     NULL);
-   g_object_unref (source_buffer);
+  g_object_unref (source_buffer);
   
-  gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
+  gtk_window_set_default_size (GTK_WINDOW (window), GDK_UNIT_ONE_TWELFTH_EM (600), GDK_UNIT_ONE_TWELFTH_EM (400));
   gtk_widget_show_all (window);
   
 
Index: demos/gtk-demo/menus.c
===================================================================
--- demos/gtk-demo/menus.c	(revision 21028)
+++ demos/gtk-demo/menus.c	(working copy)
@@ -179,8 +179,8 @@ do_menus (GtkWidget *do_widget)
       gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
       gtk_widget_show (menuitem);
       
-      box2 = gtk_vbox_new (FALSE, 10);
-      gtk_container_set_border_width (GTK_CONTAINER (box2), 10);
+      box2 = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (10));
+      gtk_container_set_border_width (GTK_CONTAINER (box2), GDK_UNIT_ONE_TWELFTH_EM (10));
       gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, TRUE, 0);
       gtk_widget_show (box2);
 
Index: demos/gtk-demo/entry_completion.c
===================================================================
--- demos/gtk-demo/entry_completion.c	(revision 21028)
+++ demos/gtk-demo/entry_completion.c	(working copy)
@@ -58,9 +58,9 @@ do_entry_completion (GtkWidget *do_widget)
     g_signal_connect (window, "destroy",
 		      G_CALLBACK (gtk_widget_destroyed), &window);
 
-    vbox = gtk_vbox_new (FALSE, 5);
+    vbox = gtk_vbox_new (FALSE, GDK_UNIT_ONE_TWELFTH_EM (5));
     gtk_box_pack_start (GTK_BOX (GTK_DIALOG (window)->vbox), vbox, TRUE, TRUE, 0);
-    gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), GDK_UNIT_ONE_TWELFTH_EM (5));
 
     label = gtk_label_new (NULL);
     gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
Index: demos/gtk-demo/hypertext.c
===================================================================
--- demos/gtk-demo/hypertext.c	(revision 21028)
+++ demos/gtk-demo/hypertext.c	(working copy)
@@ -267,7 +267,7 @@ do_hypertext (GtkWidget *do_widget)
       gtk_window_set_screen (GTK_WINDOW (window),
                              gtk_widget_get_screen (do_widget));
       gtk_window_set_default_size (GTK_WINDOW (window),
-                                   450, 450);
+                                   GDK_UNIT_ONE_TWELFTH_EM (450), GDK_UNIT_ONE_TWELFTH_EM (450));
       
       g_signal_connect (window, "destroy",
                         G_CALLBACK (gtk_widget_destroyed), &window);
Index: gdk/gdkscreen.c
===================================================================
--- gdk/gdkscreen.c	(revision 21028)
+++ gdk/gdkscreen.c	(working copy)
@@ -52,6 +52,7 @@ enum
   SIZE_CHANGED,
   COMPOSITED_CHANGED,
   MONITORS_CHANGED,
+  UNIT_CHANGED,
   LAST_SIGNAL
 };
 
@@ -147,6 +148,32 @@ gdk_screen_class_init (GdkScreenClass *klass)
 		  g_cclosure_marshal_VOID__VOID,
 		  G_TYPE_NONE,
 		  0);
+
+  /**
+   * GdkScreen::unit-changed:
+   * @screen: the object on which the signal is emitted
+   * @em_factor: the factor by which the unit changed for em units or
+   * negative if unknown
+   *
+   * The ::unit-changed signal is emitted when circumstances change
+   * that the unit to pixel conversion mechanism depends on. Such
+   * things might include user configurable DPI and user configurable
+   * default font.
+   *
+   * Only for X for now. Future implementations for Win32 and
+   * OS X may be a possibility.
+   *
+   * Since: 2.14
+   */
+  signals[UNIT_CHANGED] =
+    g_signal_new (g_intern_static_string ("unit_changed"),
+		  G_OBJECT_CLASS_TYPE (klass),
+		  G_SIGNAL_RUN_LAST,
+		  G_STRUCT_OFFSET (GdkScreenClass, unit_changed),
+		  NULL, NULL,
+		  g_cclosure_marshal_VOID__DOUBLE,
+		  G_TYPE_NONE, 1,
+		  G_TYPE_DOUBLE);
 }
 
 static void
Index: gdk/gdk.h
===================================================================
--- gdk/gdk.h	(revision 21028)
+++ gdk/gdk.h	(working copy)
@@ -55,6 +55,7 @@
 #include <gdk/gdkspawn.h>
 #include <gdk/gdktestutils.h>
 #include <gdk/gdktypes.h>
+#include <gdk/gdkunit.h>
 #include <gdk/gdkvisual.h>
 #include <gdk/gdkwindow.h>
 
Index: gdk/gdkscreen.h
===================================================================
--- gdk/gdkscreen.h	(revision 21028)
+++ gdk/gdkscreen.h	(working copy)
@@ -63,6 +63,7 @@ struct _GdkScreenClass
   void (*size_changed) (GdkScreen *screen);
   void (*composited_changed) (GdkScreen *screen);
   void (*monitors_changed) (GdkScreen *screen);
+  void (*unit_changed) (GdkScreen *screen, gdouble factor);
 };
 
 GType        gdk_screen_get_type              (void) G_GNUC_CONST;
Index: gdk/gdk.symbols
===================================================================
--- gdk/gdk.symbols	(revision 21028)
+++ gdk/gdk.symbols	(working copy)
@@ -1276,6 +1276,28 @@ gdk_window_impl_get_type G_GNUC_CONST
 #endif
 #endif
 
+
+#if IN_HEADER(__GDK_UNIT_H__)
+#if IN_FILE(__GDK_UNIT_C__)
+gdk_param_unit_get_type G_GNUC_CONST
+gdk_param_spec_unit
+gdk_value_set_unit
+gdk_value_get_unit
+gdk_value_unit_skip_conversion
+
+gdk_param_uunit_get_type G_GNUC_CONST
+gdk_param_spec_uunit
+gdk_value_set_uunit
+gdk_value_get_uunit
+gdk_value_uunit_skip_conversion
+
+gdk_unit_to_string
+gdk_unit_enable_resolution_independence
+gdk_unit_to_pixel
+gdk_unit_em
+#endif
+#endif
+
 #ifdef INCLUDE_VARIABLES
 gdk_threads_mutex
 gdk_threads_lock
Index: gdk/x11/gdkscreen-x11.c
===================================================================
--- gdk/x11/gdkscreen-x11.c	(revision 21028)
+++ gdk/x11/gdkscreen-x11.c	(working copy)
@@ -1001,6 +1001,12 @@ _gdk_x11_screen_process_monitors_change (GdkScreen
 }
 
 void
+_gdk_x11_screen_process_unit_change (GdkScreen *screen, gdouble factor)
+{
+  g_signal_emit_by_name (screen, "unit_changed", factor);
+}
+
+void
 _gdk_x11_screen_window_manager_changed (GdkScreen *screen)
 {
   g_signal_emit (screen, signals[WINDOW_MANAGER_CHANGED], 0);
Index: gdk/x11/gdkscreen-x11.h
===================================================================
--- gdk/x11/gdkscreen-x11.h	(revision 21028)
+++ gdk/x11/gdkscreen-x11.h	(working copy)
@@ -127,6 +127,7 @@ void _gdk_x11_screen_size_changed           (GdkSc
 void _gdk_x11_screen_process_owner_change (GdkScreen *screen,
 					   XEvent    *event);
 void _gdk_x11_screen_process_monitors_change (GdkScreen *screen);
+void _gdk_x11_screen_process_unit_change (GdkScreen *screen, gdouble factor);
 
 G_END_DECLS
 
Index: gdk/x11/gdkevents-x11.c
===================================================================
--- gdk/x11/gdkevents-x11.c	(revision 21028)
+++ gdk/x11/gdkevents-x11.c	(working copy)
@@ -40,6 +40,7 @@
 #include "xsettings-client.h"
 
 #include <string.h>
+#include <math.h>
 
 #include "gdkinputprivate.h"
 #include "gdksettings.c"
@@ -2870,6 +2871,25 @@ gdk_xsettings_notify_cb (const char       *name,
 
   if (screen_x11->xsettings_in_init)
     return;
+
+  /* both the default font and the DPI affects unit conversions */
+  if (action == XSETTINGS_ACTION_CHANGED &&
+      (((strcmp (name, "Gtk/FontName") == 0) || (strcmp (name, "Xft/DPI") == 0))))
+    {
+      gdouble a, b, em_factor;
+
+      a = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (100));
+      _gdk_unit_invalidate_caches ();
+      b = GDK_UNIT_TO_PIXEL (GDK_UNIT_ONE_TWELFTH_EM (100));
+
+      em_factor = b / a;
+
+      if (fabs (em_factor - 1.0) > 0.01)
+        {
+          /*g_debug ("font size changed, em_factor: %g (100em: %d px -> %d px)", em_factor, (gint) a, (gint) b);*/
+          _gdk_x11_screen_process_unit_change (GDK_SCREEN (screen_x11), em_factor);
+        }
+    }
   
   new_event.type = GDK_SETTING;
   new_event.setting.window = gdk_screen_get_root_window (screen);
Index: gdk/Makefile.am
===================================================================
--- gdk/Makefile.am	(revision 21028)
+++ gdk/Makefile.am	(working copy)
@@ -91,6 +91,7 @@ gdk_public_h_sources =				\
 	gdkspawn.h				\
 	gdktestutils.h				\
 	gdktypes.h				\
+	gdkunit.h				\
 	gdkvisual.h				\
 	gdkwindow.h
 
@@ -134,6 +135,7 @@ gdk_c_sources =                 \
 	gdkrgb.c		\
 	gdkscreen.c		\
 	gdkselection.c		\
+	gdkunit.c		\
 	gdkvisual.c		\
 	gdkwindow.c		\
 	gdkwindowimpl.c
--- /dev/null	2008-08-06 09:47:42.948261850 -0400
+++ gdk/gdkunit.h	2008-08-06 23:51:56.000000000 -0400
@@ -0,0 +1,143 @@
+/* GDK - The GIMP Drawing Kit
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdk.h> can be included directly."
+#endif
+
+#ifndef __GDK_UNIT_H__
+#define __GDK_UNIT_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GdkUnit:
+ *
+ * A data type for storing signed units.
+ *
+ * Since: 2.14
+ */
+typedef gint GdkUnit;
+
+/**
+ * GdkUUnit:
+ *
+ * A data type for storing unsigned units.
+ *
+ * Since: 2.14
+ */
+typedef guint GdkUUnit;
+
+/* ---- */
+
+#define GDK_IS_PARAM_SPEC_UNIT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GDK_TYPE_PARAM_UNIT))
+#define GDK_PARAM_SPEC_UNIT(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GDK_TYPE_PARAM_UNIT, GdkParamSpecUnit))
+#define GDK_TYPE_PARAM_UNIT           (gdk_param_unit_get_type())
+
+GType gdk_param_unit_get_type (void) G_GNUC_CONST;
+
+GParamSpec *gdk_param_spec_unit (const gchar  *name,
+                                 const gchar  *nick,
+                                 const gchar  *blurb,
+                                 GdkUnit       default_value,
+                                 GParamFlags   flags);
+void gdk_value_set_unit         (GValue       *value,
+                                 GdkUnit       v_unit);
+GdkUnit gdk_value_get_unit      (const GValue *value);
+
+void gdk_value_unit_skip_conversion (GValue *value);
+
+/* ---- */
+
+#define GDK_IS_PARAM_SPEC_UUNIT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GDK_TYPE_PARAM_UUNIT))
+#define GDK_PARAM_SPEC_UUNIT(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GDK_TYPE_PARAM_UUNIT, GdkParamSpecUUnit))
+#define GDK_TYPE_PARAM_UUNIT           (gdk_param_uunit_get_type())
+
+GType gdk_param_uunit_get_type (void) G_GNUC_CONST;
+
+GParamSpec *gdk_param_spec_uunit (const gchar  *name,
+                                  const gchar  *nick,
+                                  const gchar  *blurb,
+                                  GdkUUnit      default_value,
+                                  GParamFlags   flags);
+void gdk_value_set_uunit         (GValue       *value,
+                                  GdkUUnit      v_unit);
+GdkUUnit gdk_value_get_uunit     (const GValue *value);
+
+void gdk_value_uunit_skip_conversion (GValue *value);
+
+/* ---- */
+
+gint gdk_unit_to_pixel (GdkUnit unit) G_GNUC_WARN_UNUSED_RESULT;
+gint gdk_unit_em (gdouble em);
+
+gchar *gdk_unit_to_string (GdkUnit unit);
+/* TODO: probably want GdkUnit gdk_unit_from_string(const gchar *s) as well */
+
+/* for now, use functions so apps can "opt in" to using resolution
+ * independent units - when this is mandatory (e.g. gtk 3.x) this
+ * can be changed into macros
+ */
+void gdk_unit_enable_resolution_independence (void);
+
+
+/**
+ * GDK_UNIT_TO_PIXEL:
+ * @unit: A #GdkUnit or #GdkUUnit
+ *
+ * Converts @unit to an integer representing the number of pixels
+ * taking factors like font size etc. into account.
+ *
+ * Since: 2.14
+ */
+#define GDK_UNIT_TO_PIXEL(unit) gdk_unit_to_pixel(unit)
+
+/**
+ * GDK_UNIT_EM:
+ * @em: An em
+ *
+ * This macro returns @em in a #GdkUnit. If resolution independent
+ * rendering isn't enabled (see
+ * gdk_unit_enable_resolution_independence()), then 12 * @em is
+ * returned instead.
+ *
+ * Since: 2.14
+ */
+#define GDK_UNIT_EM(em) gdk_unit_em(em)
+
+/**
+ * GDK_UNIT_ONE_TWELFTH_EM:
+ * @value: A value in 1/12th of an em
+ *
+ * This macro returns @value / 12 em's in a #GdkUnit. If resolution
+ * independent rendering isn't enabled (see
+ * gdk_unit_enable_resolution_independence()), then @value is returned
+ * instead.
+ *
+ * Since: 2.14
+ */
+#define GDK_UNIT_ONE_TWELFTH_EM(value) GDK_UNIT_EM((value)/12.0)
+
+/* private */
+void _gdk_unit_invalidate_caches (void);
+
+G_END_DECLS
+
+#endif /* __GDK_UNIT_H__ */
--- /dev/null	2008-08-06 09:47:42.948261850 -0400
+++ gdk/gdkunit.c	2008-08-07 00:01:37.000000000 -0400
@@ -0,0 +1,635 @@
+/* GDK - The GIMP Drawing Kit
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include <stdlib.h>
+#include "config.h"
+#include "gdkunit.h"
+#include "gdkintl.h"
+#include "gdkalias.h"
+
+/**
+ * SECTION:gdkunit
+ * @short_description: Resolution independent rendering
+ *
+ * The #GdkUnit type is used to implement resolution independent
+ * rendering. By using high bits in a #gint, the standard integer type
+ * is overloaded to be able to carry information about the unit; for
+ * example pixels or <ulink
+ * url="http://en.wikipedia.org/wiki/Em_(typography)">em</ulink>'s.
+ *
+ * To specify a pixel size, simply treat #GdkUnit as an integer:
+ * <programlisting>
+ * GdkUnit unit;
+ * unit = 42;
+ * </programlisting>
+ * To specify an em:
+ * <programlisting>
+ * GdkUnit unit;
+ * unit = GDK_UNIT_EM (2.5);
+ * </programlisting>
+ * Internally, #GdkUnit stores em's using fixed precision; as such
+ * floating point numbers can be used in the GDK_UNIT_EM() macro.
+ *
+ * To convert a #GdkUnit to pixels simply use GDK_UNIT_TO_PIXEL().
+ *
+ * Thus, the #GdkUnit type is backwards compatible and can be used as
+ * a drop-in replacement for #gint assuming the range of values passed
+ * in doesn't exceed billions. Also, the #GdkUnit is future proof
+ * insofar that it can be extended in the future to store other kinds
+ * of units, for example physical units (mm or inches) or point sizes.
+ *
+ * #GdkUUnit is #GdkUnit's unsigned companion. The construction and
+ * conversion macros for #GdkUnit applies to #GdkUUnit as well.
+ */
+
+typedef struct _GdkParamSpecUnit GdkParamSpecUnit;
+
+struct _GdkParamSpecUnit
+{
+  GParamSpecInt parent_instance;
+};
+
+typedef struct _GdkParamSpecUUnit GdkParamSpecUUnit;
+
+struct _GdkParamSpecUUnit
+{
+  GParamSpecUInt parent_instance;
+};
+
+static gboolean need_refresh = TRUE;
+
+static gboolean units_enabled = FALSE;
+static gdouble pixels_per_em = 12.0;
+static gboolean application_wants_to_use_units = FALSE;
+
+void
+_gdk_unit_invalidate_caches (void)
+{
+  need_refresh = TRUE;
+}
+
+/**
+ * gdk_unit_enable_resolution_independence:
+ *
+ * Resolution independent rendering is an opt-in feature; applications
+ * need to enable it by default by calling this function before
+ * invoking gtk_init().
+ *
+ * Since: 2.14
+ **/
+void
+gdk_unit_enable_resolution_independence (void)
+{
+  application_wants_to_use_units = TRUE;
+}
+
+static char *
+get_font_name (void)
+{
+  char *font_name;
+  GdkScreen *screen;
+
+  if (g_getenv ("GTK_FONT_NAME") != NULL)
+    {
+      font_name = g_strdup (g_getenv ("GTK_FONT_NAME"));
+      goto out;
+    }
+
+  screen = gdk_screen_get_default ();
+  if (screen != NULL)
+    {
+      GValue value = {0, };
+      g_value_init (&value, G_TYPE_STRING);
+      gdk_screen_get_setting (screen, "gtk-font-name", &value);
+      font_name = g_value_dup_string (&value);
+      g_value_unset (&value);
+    }
+
+ out:
+  return font_name;
+}
+
+/* returns negative if DPI can't be found */
+static gdouble
+get_dpi_for_screen (GdkScreen *screen)
+{
+  gdouble dpi;
+  GValue val = {0, };
+
+  if (screen == NULL)
+    screen = gdk_screen_get_default ();
+
+  dpi = -1.0;
+
+  g_value_init (&val, G_TYPE_INT);
+  if (gdk_screen_get_setting (screen, "gtk-xft-dpi", &val))
+    {
+      dpi = g_value_get_int (&val) / 1024;
+    }
+
+  return dpi;
+}
+
+static void
+refresh (void)
+{
+  const char *s;
+  PangoFontDescription *font_desc;
+  char *font_name;
+  gdouble dpi;
+
+  units_enabled = FALSE;
+
+  /* the GDK_UNITS environment variable can override the result of
+   * gdk_unit_enable() that the application currently MUST use in
+   * order to turn on resolution independence
+   */
+  s = g_getenv ("GDK_UNIT_RESOLUTION_INDEPENCE_FORCE");
+  if (s != NULL)
+    {
+      if (g_ascii_strcasecmp (s, "disabled") == 0 || g_ascii_strcasecmp (s, "0") == 0)
+        {
+          goto out;
+        }
+
+      if (g_ascii_strcasecmp (s, "enabled") == 0 || g_ascii_strcasecmp (s, "1") == 0)
+        {
+          units_enabled = TRUE;
+          goto use_units;
+        }
+    }
+
+  if (!application_wants_to_use_units)
+    goto out;
+
+ use_units:
+  units_enabled = TRUE;
+  dpi = -1.0;
+  pixels_per_em = 12.0;
+
+  font_name = get_font_name ();
+  if (font_name != NULL)
+    {
+
+      font_desc = pango_font_description_from_string (font_name);
+      if (font_desc != NULL)
+        {
+          gint pango_size;
+          gboolean is_absolute;
+
+          pango_size = pango_font_description_get_size (font_desc);
+          is_absolute = pango_font_description_get_size_is_absolute (font_desc);
+          if (!is_absolute)
+            {
+              gdouble dpi_to_use;
+
+              /* TODO: we need to record pixels_per_em per screen (maybe even per monitor!) */
+              dpi = get_dpi_for_screen (NULL);
+              if (dpi < 0)
+                {
+                  dpi_to_use = 96.0;
+                  g_warning ("Xft/DPI not found; assuming 96 DPI for resolution independent rendering");
+                }
+              else
+                {
+                  dpi_to_use = dpi;
+                }
+
+              /* pango_size is in points; 10 points at 96 DPI is 12 pixels; convert accordingly */
+              pixels_per_em = 1.2 * (dpi_to_use * (((gdouble) pango_size) / PANGO_SCALE) / 96.0);
+            }
+          else
+            {
+              g_warning ("FIXME: add support for is_absolute (pango_size=%d); defaulting to pixels_per_em=12.0",
+                         pango_size);
+              pixels_per_em = 12.0;
+            }
+
+          pango_font_description_free (font_desc);
+        }
+    }
+
+  /* TODO: can probably remove this */
+  if (pixels_per_em > 120.0)
+    {
+      g_warning ("pixels_per_em=%f, clamping to 120.0", pixels_per_em);
+      pixels_per_em = 120.0;
+    }
+
+  /* TODO: this is just debug spew; should be removed at some point */
+  {
+    char *dpi_string;
+    if (dpi < 0)
+      dpi_string = g_strdup ("<unset>");
+    else
+      dpi_string = g_strdup_printf ("%g", dpi);
+    g_debug ("using 1 em -> %g pixels (font='%s' dpi=%s)\n",
+             pixels_per_em,
+             font_name != NULL ? font_name : "<unset>",
+             dpi_string);
+    g_free (dpi_string);
+  }
+
+  g_free (font_name);
+
+ out:
+  need_refresh = FALSE;
+}
+
+/*
+ * signed pixel value IFF bit 31 and bit 30 are set
+ *
+ * em IFF bit 31 unset and bit 30 is set
+ *   postive em IFF bit 29 is unset
+ *   negative em IFF bit 29 is set  (negated em (ie. positive) is stored in bits 1-28)
+ *
+ */
+
+//#define GDK_UNIT_IS_EM(x) ((x & (1<<30)) != 0)
+//#define GDK_UNIT_EM_GET(x) (x & ((1<<30) - 1))
+
+#undef _TEST_BIT
+#undef _GET_BITS
+#define _TEST_BIT(x,y) (((x) & (1<<(y))) != 0)
+#define _GET_BITS(x,y) (((x) & ((1<<(y)) - 1)))
+
+#define GDK_UNIT_IS_EM(x) (!_TEST_BIT(x, 31) && _TEST_BIT(x, 30))
+#define GDK_UNIT_EM_GET(x) (_GET_BITS (x, 29) * (_TEST_BIT(x,29) ? -1 : 1))
+
+/**
+ * gdk_unit_em:
+ * @em: size in em's
+ *
+ * Stores @em in a #GdkUnit. If resolution independent rendering is
+ * disabled, then 12 * @em is returned instead. Use the macro
+ * GDK_UNIT_EM() instead.
+ *
+ * Returns: a #GdkUnit
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gdk_unit_em (gdouble em)
+{
+  if (G_UNLIKELY (need_refresh))
+    refresh ();
+
+  /* if units are not enabled; assume 1em == 12 pixels */
+  if (G_LIKELY (!units_enabled))
+    return (gint) (em*12.0);
+
+  if (em > 0)
+    return ((gint) (120.0*em)) | (1<<30);
+  else
+    return ((gint) (120.0*(-em))) | (1<<30) | (1<<29);
+}
+
+/**
+ * gdk_unit_to_pixel:
+ * @unit: A #GdkUnit or #GdkUUnit
+ *
+ * Converts @unit to an integer representing the number of pixels
+ * taking factors like font size etc. into account. Use the macro
+ * GDK_UNIT_TO_PIXEL() instead.
+ *
+ * Returns: An integer
+ *
+ * Since: 2.14
+ **/
+gint
+gdk_unit_to_pixel (gint unit)
+{
+  gint val;
+
+  if (G_UNLIKELY (need_refresh))
+    refresh ();
+
+  if (G_LIKELY (!units_enabled))
+    return unit;
+
+  /* special case for abusive sentinels (I'm looking at you GtkToolbar) */
+  if (unit == G_MAXINT || unit == G_MAXUINT)
+    val = unit;
+  else
+    {
+      if (GDK_UNIT_IS_EM (unit))
+        {
+          val = (gint) ((GDK_UNIT_EM_GET (unit) * pixels_per_em / 120.0) + 0.5);
+          //g_debug ("utp: em: %g -> %d", GDK_UNIT_EM_GET (unit) / 120.0, val);
+        }
+      else
+        {
+          val = unit;
+          //g_debug ("utp: pixel: %d", val);
+        }
+    }
+
+  return val;
+}
+
+/* -------------------------------------------------------------------------------- */
+
+/**
+ * gdk_unit_to_string:
+ * @unit: A #GdkUnit or #GdkUUnit
+ *
+ * Returns a human readable textual representation of @unit such as "2
+ * px" or "0.5 em".
+ *
+ * Returns: the textual representation of @unit - free with g_free().
+ *
+ * Since: 2.14
+ **/
+gchar *
+gdk_unit_to_string (GdkUnit unit)
+{
+  gchar *s;
+
+  if (GDK_UNIT_IS_EM (unit))
+    {
+      s = g_strdup_printf ("%g em", GDK_UNIT_EM_GET (unit) / 120.0);
+    }
+  else
+    {
+      s = g_strdup_printf ("%d px", unit);
+    }
+
+  return s;
+}
+
+/* -------------------------------------------------------------------------------- */
+
+static void
+gdk_param_unit_class_init (GParamSpecClass *class)
+{
+  class->value_type = G_TYPE_INT;
+}
+
+GType
+gdk_param_unit_get_type (void)
+{
+  static GType type = 0;
+
+  if (G_UNLIKELY (type == 0))
+    {
+      static const GTypeInfo type_info =
+      {
+        sizeof (GParamSpecClass),
+        NULL,
+        NULL,
+        (GClassInitFunc) gdk_param_unit_class_init,
+        NULL,
+        NULL,
+        sizeof (GdkParamSpecUnit),
+        0,
+        NULL,
+        NULL
+      };
+
+      type = g_type_register_static (G_TYPE_PARAM_INT,
+                                     "GdkParamUnit",
+                                     &type_info,
+                                     0);
+    }
+
+  return type;
+}
+
+/**
+ * gdk_param_spec_unit:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpec instance specifying a #GdkUnit property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ *
+ * Since: 2.14
+ **/
+GParamSpec *
+gdk_param_spec_unit (const gchar *name,
+                     const gchar *nick,
+                     const gchar *blurb,
+                     GdkUnit      default_value,
+                     GParamFlags  flags)
+{
+  GdkParamSpecUnit *pspec;
+  GParamSpecInt *ispec;
+  pspec = g_param_spec_internal (GDK_TYPE_PARAM_UNIT,
+                                 name, nick, blurb, flags);
+  ispec = G_PARAM_SPEC_INT (pspec);
+  ispec->default_value = default_value;
+  ispec->minimum = 0;
+  ispec->maximum = G_MAXINT;
+  return G_PARAM_SPEC (pspec);
+}
+
+/**
+ * gdk_value_set_unit:
+ * @value: a valid #GValue of type #G_TYPE_INT
+ * @v_unit: unit value to be set
+ *
+ * Sets the content of a #GdkUnit #GValue to @v_unit.
+ *
+ * Unless gdk_value_unit_skip_conversion() have been called on
+ * @v_unit, the contents will be converted to pixel values using
+ * GDK_UNIT_TO_PIXEL().
+ *
+ * Since: 2.14
+ **/
+void
+gdk_value_set_unit (GValue *value, GdkUnit v_unit)
+{
+  g_return_if_fail (G_VALUE_HOLDS_INT (value));
+  if (value->data[1].v_int == 1)
+    value->data[0].v_int = v_unit;
+  else
+    value->data[0].v_int = GDK_UNIT_TO_PIXEL (v_unit);
+}
+
+/**
+ * gdk_value_get_unit:
+ * @value: a valid #GValue of type #G_TYPE_INT
+ *
+ * Get the contents of a #GdkUnit #GValue.
+ *
+ * Returns: a #GdkUnit
+ *
+ * Since: 2.14
+ **/
+GdkUnit
+gdk_value_get_unit (const GValue *value)
+{
+  g_return_val_if_fail (G_VALUE_HOLDS_INT (value), 0);
+  return value->data[0].v_int;
+}
+
+/**
+ * gdk_value_unit_skip_conversion:
+ * @value: a valid #GdkUnit #GValue
+ *
+ * Specify that conversion to pixel values should be skipped in
+ * gdk_value_set_unit().
+ *
+ * Since: 2.14
+ **/
+void
+gdk_value_unit_skip_conversion (GValue *value)
+{
+  g_return_if_fail (G_VALUE_HOLDS_INT (value));
+  value->data[1].v_int = 1;
+}
+
+
+/* -------------------------------------------------------------------------------- */
+
+static void
+gdk_param_uunit_class_init (GParamSpecClass *class)
+{
+  class->value_type = G_TYPE_UINT;
+}
+
+GType
+gdk_param_uunit_get_type (void)
+{
+  static GType type = 0;
+
+  if (G_UNLIKELY (type == 0))
+    {
+      static const GTypeInfo type_info =
+      {
+        sizeof (GParamSpecClass),
+        NULL,
+        NULL,
+        (GClassInitFunc) gdk_param_uunit_class_init,
+        NULL,
+        NULL,
+        sizeof (GdkParamSpecUUnit),
+        0,
+        NULL,
+        NULL
+      };
+
+      type = g_type_register_static (G_TYPE_PARAM_UINT,
+                                     "GdkParamUUnit",
+                                     &type_info,
+                                     0);
+    }
+
+  return type;
+}
+
+/**
+ * gdk_param_spec_uunit:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpec instance specifying a #GdkUUnit property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Returns: a newly created parameter specification
+ *
+ * Since: 2.14
+ **/
+GParamSpec *
+gdk_param_spec_uunit (const gchar *name,
+                      const gchar *nick,
+                      const gchar *blurb,
+                      GdkUUnit     default_value,
+                      GParamFlags  flags)
+{
+  GdkParamSpecUUnit *pspec;
+  GParamSpecUInt *ispec;
+  pspec = g_param_spec_internal (GDK_TYPE_PARAM_UUNIT,
+                                 name, nick, blurb, flags);
+  ispec = G_PARAM_SPEC_UINT (pspec);
+  ispec->default_value = default_value;
+  ispec->minimum = 0;
+  ispec->maximum = G_MAXINT;
+  return G_PARAM_SPEC (pspec);
+}
+
+/**
+ * gdk_value_set_uunit:
+ * @value: a valid #GValue of type #G_TYPE_UINT
+ * @v_unit: unit value to be set
+ *
+ * Sets the content of a #GdkUUnit #GValue to @v_unit.
+ *
+ * Unless gdk_value_uunit_skip_conversion() have been called on
+ * @v_unit, the contents will be converted to pixel values using
+ * GDK_UNIT_TO_PIXEL().
+ *
+ * Since: 2.14
+ **/
+void
+gdk_value_set_uunit (GValue *value, GdkUUnit v_unit)
+{
+  g_return_if_fail (G_VALUE_HOLDS_UINT (value));
+  if (value->data[1].v_int == 1)
+    value->data[0].v_uint = v_unit;
+  else
+    value->data[0].v_uint = GDK_UNIT_TO_PIXEL (v_unit);
+}
+
+/**
+ * gdk_value_get_uunit:
+ * @value: a valid #GValue of type #G_TYPE_UINT
+ *
+ * Get the contents of a #GdkUUnit #GValue.
+ *
+ * Returns: a #GdkUUnit
+ *
+ * Since: 2.14
+ **/
+GdkUUnit
+gdk_value_get_uunit (const GValue *value)
+{
+  g_return_val_if_fail (G_VALUE_HOLDS_UINT (value), 0);
+  return value->data[0].v_uint;
+}
+
+/**
+ * gdk_value_uunit_skip_conversion:
+ * @value: a valid #GdkUUnit #GValue
+ *
+ * Specify that conversion to pixel values should be skipped in
+ * gdk_value_set_uunit().
+ *
+ * Since: 2.14
+ **/
+void
+gdk_value_uunit_skip_conversion (GValue *value)
+{
+  g_return_if_fail (G_VALUE_HOLDS_UINT (value));
+  value->data[1].v_int = 1;
+}
+
+/* -------------------------------------------------------------------------------- */
+
+#define __GDK_UNIT_C__
+#include "gdkaliasdef.c"
--- /dev/null	2008-08-06 09:47:42.948261850 -0400
+++ docs/reference/gdk/tmpl/gdkunit.sgml	2008-08-06 21:27:43.000000000 -0400
@@ -0,0 +1,142 @@
+<!-- ##### SECTION Title ##### -->
+Units
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### TYPEDEF GdkUnit ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### TYPEDEF GdkUUnit ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO GDK_UNIT_TO_PIXEL ##### -->
+<para>
+
+</para>
+
+@unit: 
+
+
+<!-- ##### MACRO GDK_UNIT_EM ##### -->
+<para>
+
+</para>
+
+@em: 
+
+
+<!-- ##### MACRO GDK_UNIT_ONE_TWELFTH_EM ##### -->
+<para>
+
+</para>
+
+@value: 
+
+
+<!-- ##### FUNCTION gdk_unit_to_string ##### -->
+<para>
+
+</para>
+
+@unit: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_param_spec_unit ##### -->
+<para>
+
+</para>
+
+@name: 
+@nick: 
+@blurb: 
+@default_value: 
+@flags: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_value_set_unit ##### -->
+<para>
+
+</para>
+
+@value: 
+@v_unit: 
+
+
+<!-- ##### FUNCTION gdk_value_get_unit ##### -->
+<para>
+
+</para>
+
+@value: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_value_unit_skip_conversion ##### -->
+<para>
+
+</para>
+
+@value: 
+
+
+<!-- ##### FUNCTION gdk_param_spec_uunit ##### -->
+<para>
+
+</para>
+
+@name: 
+@nick: 
+@blurb: 
+@default_value: 
+@flags: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_value_set_uunit ##### -->
+<para>
+
+</para>
+
+@value: 
+@v_unit: 
+
+
+<!-- ##### FUNCTION gdk_value_get_uunit ##### -->
+<para>
+
+</para>
+
+@value: 
+@Returns: 
+
+
+<!-- ##### FUNCTION gdk_value_uunit_skip_conversion ##### -->
+<para>
+
+</para>
+
+@value: 
+
+
