diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-01-14 07:33:04 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-01-14 07:35:59 -0500 |
commit | 0acc6578d81dd955bcaf1e451e6523ac776191d8 (patch) | |
tree | f6c99e44f608d1e597972531bd0dc382c69f7f84 /gtk/gtkexpander.c | |
parent | 59f1b87409c587093a68ae52500336b686c5903c (diff) | |
download | gtk+-0acc6578d81dd955bcaf1e451e6523ac776191d8.tar.gz |
expander: center the arrow
In lieu of more sophisticated alignment, we need to at least
center the arrow allocation wrt to the label.
Diffstat (limited to 'gtk/gtkexpander.c')
-rw-r--r-- | gtk/gtkexpander.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c index aa80567b1d..28173cca52 100644 --- a/gtk/gtkexpander.c +++ b/gtk/gtkexpander.c @@ -817,7 +817,7 @@ gtk_expander_allocate_title (GtkCssGadget *gadget, else label_allocation.x = allocation->x + label_xoffset; - label_allocation.y = allocation->y; + label_allocation.y = allocation->y + MAX (0, (arrow_height - label_height) / 2); label_allocation.height = label_height; gtk_widget_size_allocate (priv->label_widget, &label_allocation); @@ -833,7 +833,7 @@ gtk_expander_allocate_title (GtkCssGadget *gadget, arrow_allocation.x = allocation->x + allocation->width - arrow_width; else arrow_allocation.x = allocation->x; - arrow_allocation.y = allocation->y; + arrow_allocation.y = allocation->y + MAX (0, (label_height - arrow_height) / 2); arrow_allocation.width = arrow_width; arrow_allocation.height = arrow_height; |