summaryrefslogtreecommitdiff
path: root/gtk/gtkarrow.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-05-09 01:06:54 +0200
committerBenjamin Otte <otte@redhat.com>2011-05-09 01:07:35 +0200
commitece3c54f57dcb45cc2b45e13e928cfd332ac93c5 (patch)
tree5182e331f010f4125a94cf8a474718f49386078a /gtk/gtkarrow.c
parent2ebdcf5f37a6be9e3e7e893a0eaa6f8fc1e5943e (diff)
downloadgtk+-ece3c54f57dcb45cc2b45e13e928cfd332ac93c5.tar.gz
arrow: Don't include padding in computation of alignment
Diffstat (limited to 'gtk/gtkarrow.c')
-rw-r--r--gtk/gtkarrow.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c
index 9d46d69bf9..04e3b99152 100644
--- a/gtk/gtkarrow.c
+++ b/gtk/gtkarrow.c
@@ -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)