expander: Reinstate rtl allocation behavior

In rtl mode, we must not just reverse the children,
but also allocate from the right. Use the newly introduced
box gadget api to achieve this.

https://bugzilla.gnome.org/show_bug.cgi?id=762945
This commit is contained in:
Matthias Clasen 2016-03-03 21:28:08 -05:00
parent c48f0d6f8b
commit 763daf4420

View File

@ -787,6 +787,9 @@ gtk_expander_direction_changed (GtkWidget *widget,
gtk_box_gadget_remove_gadget (GTK_BOX_GADGET (priv->gadget), priv->title_gadget);
gtk_box_gadget_insert_gadget (GTK_BOX_GADGET (priv->gadget), 0, priv->title_gadget, FALSE, FALSE, align);
gtk_box_gadget_set_allocate_reverse (GTK_BOX_GADGET (priv->title_gadget),
gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
GTK_WIDGET_CLASS (gtk_expander_parent_class)->direction_changed (widget, previous_direction);
}