forked from AuroraMiddleware/gtk
grid: Simplify allocating children
allocation->x and allocation->y are always 0. MAX'ing width/height with 1 is also wrong now since 0 is a valid width/height for widgets.
This commit is contained in:
parent
804476a07f
commit
e7e3ef9d3e
@ -1573,10 +1573,10 @@ gtk_grid_request_allocate_children (GtkGridRequest *request,
|
||||
allocate_child (request, GTK_ORIENTATION_HORIZONTAL, child, &x, &width, &ignore);
|
||||
allocate_child (request, GTK_ORIENTATION_VERTICAL, child, &y, &height, &baseline);
|
||||
|
||||
child_allocation.x = allocation->x + x;
|
||||
child_allocation.y = allocation->y + y;
|
||||
child_allocation.width = MAX (1, width);
|
||||
child_allocation.height = MAX (1, height);
|
||||
child_allocation.x = x;
|
||||
child_allocation.y = y;
|
||||
child_allocation.width = width;
|
||||
child_allocation.height = height;
|
||||
|
||||
if (_gtk_widget_get_direction (GTK_WIDGET (request->grid)) == GTK_TEXT_DIR_RTL)
|
||||
child_allocation.x = allocation->x + allocation->width
|
||||
|
Loading…
Reference in New Issue
Block a user