[gtk/constraint-flexible-space] Make the constraints demo more interesting
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/constraint-flexible-space] Make the constraints demo more interesting
- Date: Wed, 26 Jun 2019 02:36:14 +0000 (UTC)
commit 9e483bbe93e5dd272181da57cf15bbcddd70596c
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jun 26 02:35:15 2019 +0000
Make the constraints demo more interesting
Add a max size to the buttons, to force the
space to open up.
demos/gtk-demo/constraints.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/demos/gtk-demo/constraints.c b/demos/gtk-demo/constraints.c
index 8d0cab9a09..0383dc403e 100644
--- a/demos/gtk-demo/constraints.c
+++ b/demos/gtk-demo/constraints.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]