Make the constraints demo more interesting

Add a max size to the buttons, to force the
space to open up.
This commit is contained in:
Matthias Clasen 2019-06-26 02:35:15 +00:00 committed by Emmanuele Bassi
parent 38d353dc1a
commit 7c96326c18

View File

@ -84,6 +84,12 @@ build_constraints (SimpleGrid *self,
NULL);
gtk_constraint_layout_add_guide (manager, guide);
gtk_constraint_layout_add_constraint (manager,
gtk_constraint_new_constant (GTK_CONSTRAINT_TARGET (self->button1),
GTK_CONSTRAINT_ATTRIBUTE_WIDTH,
GTK_CONSTRAINT_RELATION_LE,
200.0,
GTK_CONSTRAINT_STRENGTH_REQUIRED));
gtk_constraint_layout_add_constraint (manager,
gtk_constraint_new (NULL,
GTK_CONSTRAINT_ATTRIBUTE_START,