]> Pileus Git - ~andy/gtk/commitdiff
arrow: Don't include padding in computation of alignment
authorBenjamin Otte <otte@redhat.com>
Sun, 8 May 2011 23:06:54 +0000 (01:06 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 8 May 2011 23:07:35 +0000 (01:07 +0200)
gtk/gtkarrow.c

index 9d46d69bf9bf05b0c8204792254c9a04c3b49403..04e3b9915235d4d4a531af7f338bd961e21f8aa5 100644 (file)
@@ -330,10 +330,10 @@ gtk_arrow_draw (GtkWidget *widget,
   gtk_misc_get_padding (misc, &xpad, &ypad);
   gtk_misc_get_alignment (misc, &xalign, &yalign);
 
-  width = gtk_widget_get_allocated_width (widget);
-  height = gtk_widget_get_allocated_height (widget);
+  width = gtk_widget_get_allocated_width (widget) - 2 * xpad;
+  height = gtk_widget_get_allocated_height (widget) - 2 * ypad;
 
-  extent = MIN (width - 2 * xpad, height - 2 * ypad) * arrow_scaling;
+  extent = MIN (width, height) * arrow_scaling;
   effective_arrow_type = priv->arrow_type;
 
   if (gtk_widget_get_direction (widget) != GTK_TEXT_DIR_LTR)