[gtk+] expander: Reinstate rtl allocation behavior
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] expander: Reinstate rtl allocation behavior
- Date: Fri, 4 Mar 2016 02:29:13 +0000 (UTC)
commit 763daf44208762b80d118182bc5b5f2d6cfafc9c
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 3 21:28:08 2016 -0500
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
gtk/gtkexpander.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index f6cea5c..3f32da4 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]