[gtk/constraint-guide-3] constrainttree: Fix criticals



commit 7e11df9154dd09fd5c08694aee60f34873a45d12
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jun 28 17:10:44 2019 +0000

    constrainttree: Fix criticals
    
    We don't want the edit constraints to be required,
    since we want to violate them when the pointer moves
    off the edge. Make them strong instead, and now
    everything just works.

 tests/constrainttree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/constrainttree.c b/tests/constrainttree.c
index 6ce3f3bc6e..c08f8ef141 100644
--- a/tests/constrainttree.c
+++ b/tests/constrainttree.c
@@ -214,10 +214,10 @@ drag_begin (GtkGestureDrag *drag,
 
   gtk_constraint_solver_add_edit_variable (solver,
                                            drag_node->x_var,
-                                           GTK_CONSTRAINT_WEIGHT_REQUIRED);
+                                           GTK_CONSTRAINT_WEIGHT_STRONG);
   gtk_constraint_solver_add_edit_variable (solver,
                                            drag_node->y_var,
-                                           GTK_CONSTRAINT_WEIGHT_REQUIRED);
+                                           GTK_CONSTRAINT_WEIGHT_STRONG);
   gtk_constraint_solver_begin_edit (solver);
 }
 


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