]> Pileus Git - ~andy/gtk/commitdiff
image: take misc padding into account when calculating x/y draw coords
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 12 Dec 2011 11:30:27 +0000 (12:30 +0100)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 12 Dec 2011 11:30:27 +0000 (12:30 +0100)
This fixes the misc-alignment.ui reftest.

gtk/gtkimage.c

index 845dee2a6ce6addd2ddd8afc96da11089fa3859c..519dfbd2e57072b1eaa14661a0e329beb676fea9 100644 (file)
@@ -1305,7 +1305,7 @@ gtk_image_draw (GtkWidget *widget,
 
   gtk_misc_get_alignment (misc, &xalign, &yalign);
   gtk_misc_get_padding (misc, &xpad, &ypad);
-  _gtk_icon_helper_get_size (priv->icon_helper, context, &width, &height);
+  gtk_image_get_preferred_size (image, &width, &height);
 
   if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_LTR)
     xalign = 1.0 - xalign;