summaryrefslogtreecommitdiff
path: root/gtk/gtkflowbox.c
diff options
context:
space:
mode:
authorRafal Luzynski <digitalfreak@lingonborough.com>2015-09-04 11:21:08 +0200
committerMatthias Clasen <mclasen@redhat.com>2015-09-04 09:23:52 -0400
commit7a676cdc14ae854f8fd6817bdaa99ae88df56973 (patch)
tree85702aa41e368c2e1f4824bce33200355d8d671f /gtk/gtkflowbox.c
parent6457ee59be68d22ebefac08e3dd0c58d6bf2ddbf (diff)
downloadgtk+-7a676cdc14ae854f8fd6817bdaa99ae88df56973.tar.gz
flow box: Fix bad children allocation with RTL locales
If the position of the children is always relative to the box then we should not take the allocation of the box into account when flipping the children for RTL text direction. This patch also removes unused assignments to child_allocation. https://bugzilla.gnome.org/show_bug.cgi?id=754559
Diffstat (limited to 'gtk/gtkflowbox.c')
-rw-r--r--gtk/gtkflowbox.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 8b65d65ecf..f53e908c00 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -1606,11 +1606,6 @@ gtk_flow_box_size_allocate (GtkWidget *widget,
gint i, this_line_size;
GSequenceIter *iter;
- child_allocation.x = 0;
- child_allocation.y = 0;
- child_allocation.width = 0;
- child_allocation.height = 0;
-
gtk_widget_set_allocation (widget, allocation);
window = gtk_widget_get_window (widget);
if (window != NULL)
@@ -1618,10 +1613,6 @@ gtk_flow_box_size_allocate (GtkWidget *widget,
allocation->x, allocation->y,
allocation->width, allocation->height);
- child_allocation.x = 0;
- child_allocation.y = 0;
- child_allocation.width = allocation->width;
-
min_items = MAX (1, priv->min_children_per_line);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
@@ -1938,7 +1929,7 @@ gtk_flow_box_size_allocate (GtkWidget *widget,
}
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
- child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
+ child_allocation.x = allocation->width - child_allocation.x - child_allocation.width;
gtk_widget_size_allocate (child, &child_allocation);
item_offset += this_item_size;