[gtk/constraint-grid-2] constraint layout: Dont reset constraints in allocate



commit 055772e4873dbee8507dd567d888758bbd084316
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 29 17:36:47 2019 +0000

    constraint layout: Dont reset constraints in allocate
    
    If trust our allocation algorithm, this can never
    trigger (and in fact, it never does).

 gtk/gtkconstraintlayout.c | 27 ---------------------------
 1 file changed, 27 deletions(-)
---
diff --git a/gtk/gtkconstraintlayout.c b/gtk/gtkconstraintlayout.c
index 50670c2139..884a3fe3e2 100644
--- a/gtk/gtkconstraintlayout.c
+++ b/gtk/gtkconstraintlayout.c
@@ -908,33 +908,6 @@ gtk_constraint_layout_allocate (GtkLayoutManager *manager,
                      gtk_constraint_variable_get_value (layout_width),
                      gtk_constraint_variable_get_value (layout_height)));
 
-  gtk_constraint_solver_freeze (solver);
-
-  /* We reset the constraints on the size of each child, so we are sure the
-   * layout is up to date
-   */
-  for (child = _gtk_widget_get_first_child (widget);
-       child != NULL;
-       child = _gtk_widget_get_next_sibling (child))
-    {
-      GtkRequisition min_req, nat_req;
-      GtkConstraintLayoutChild *info;
-
-      if (!gtk_widget_should_layout (child))
-        continue;
-
-      gtk_widget_get_preferred_size (child, &min_req, &nat_req);
-
-      info = GTK_CONSTRAINT_LAYOUT_CHILD (gtk_layout_manager_get_layout_child (manager, child));
-
-      update_child_constraint (self, info, child, MIN_WIDTH, min_req.width);
-      update_child_constraint (self, info, child, MIN_HEIGHT, min_req.height);
-      update_child_constraint (self, info, child, NAT_WIDTH, nat_req.width);
-      update_child_constraint (self, info, child, NAT_HEIGHT, nat_req.height);
-    }
-
-  gtk_constraint_solver_thaw (solver);
-
   for (child = _gtk_widget_get_first_child (widget);
        child != NULL;
        child = _gtk_widget_get_next_sibling (child))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]