Index: gtklabel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklabel.c,v
retrieving revision 1.129
diff -u -p -r1.129 gtklabel.c
--- gtklabel.c	14 May 2002 20:55:22 -0000	1.129
+++ gtklabel.c	1 Jun 2002 17:49:21 -0000
@@ -1648,15 +1648,20 @@ get_layout_location (GtkLabel  *label,
     xalign = misc->xalign;
   else
     xalign = 1.0 - misc->xalign;
-  
-  x = floor (widget->allocation.x + (gint)misc->xpad
-             + ((widget->allocation.width - widget->requisition.width) * xalign)
-             + 0.5);
-  
+
+  x = floor (widget->allocation.x + (gint)misc->xpad +
+	     xalign * (widget->allocation - widget->requisition.width) + 0.5);
+
+  if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
+    x = MAX (x, widget->allocation->x + misc->xpad);
+  else
+    x = MIN (x,
+	     widget->allocation->x + widget->allocation.width -
+	     widget->requistion.width - misc->xpad);
+
   y = floor (widget->allocation.y + (gint)misc->ypad 
-             + ((widget->allocation.height - widget->requisition.height) * misc->yalign)
-             + 0.5);
-  
+             + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign)
+		    + 0.5, 0));
 
   if (xp)
     *xp = x;
