summaryrefslogtreecommitdiff
path: root/gtk/gtkbox.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-02-06 23:58:06 +0100
committerTimm Bäder <mail@baedert.org>2018-02-09 11:36:53 +0100
commit1cfbe9c3d06bbd07d1a148576aec7059413f22eb (patch)
tree003a9eb1829e9de899a39cde2389db499b50d703 /gtk/gtkbox.c
parent3a4c6c18b30fadb0ffb24564b99cb9b88146a900 (diff)
downloadgtk+-1cfbe9c3d06bbd07d1a148576aec7059413f22eb.tar.gz
box: Simplify size_allocate
Stop looking at the box allocation position since both x and y are 0.
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r--gtk/gtkbox.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 927093e458..6d2fd58631 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -586,21 +586,21 @@ gtk_box_size_allocate (GtkWidget *widget,
{
if (private->orientation == GTK_ORIENTATION_HORIZONTAL)
{
- child_allocation.y = allocation->y;
+ child_allocation.y = 0;
child_allocation.height = allocation->height;
if (packing == GTK_PACK_START)
- x = allocation->x;
+ x = 0;
else
- x = allocation->x + allocation->width;
+ x = allocation->width;
}
else
{
- child_allocation.x = allocation->x;
+ child_allocation.x = 0;
child_allocation.width = allocation->width;
if (packing == GTK_PACK_START)
- y = allocation->y;
+ y = 0;
else
- y = allocation->y + allocation->height;
+ y = allocation->height;
}
for (i = 0, children = private->children;
@@ -642,7 +642,7 @@ gtk_box_size_allocate (GtkWidget *widget,
}
if (direction == 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 - allocation->x) - child_allocation.width;
}
else /* (private->orientation == GTK_ORIENTATION_VERTICAL) */