[gtk/wip/ebassi/constraint-layout: 33/69] Make the constraints demo more interesting
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/constraint-layout: 33/69] Make the constraints demo more interesting
- Date: Sun, 30 Jun 2019 23:12:53 +0000 (UTC)
commit 7c96326c188e214c9dcfc3274b8fb3cab269b016
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 ba13f9b00f..708414f435 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]