[gtk/matthiasc/for-master: 4/6] gtk-demo: Tweak the new constraints demo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk/matthiasc/for-master: 4/6] gtk-demo: Tweak the new constraints demo
- Date: Fri, 30 Oct 2020 19:03:27 +0000 (UTC)
commit 8e7157389877c0e074f83a0980a3cd979063ac33
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 30 12:33:59 2020 -0400
    gtk-demo: Tweak the new constraints demo
    
    With these somewhat random ordering changes, things get
    closer to working the same as the code example. Still,
    the guide doesn't work right.
 demos/gtk-demo/constraints.ui | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/demos/gtk-demo/constraints.ui b/demos/gtk-demo/constraints.ui
index 37a58ba87f..5011caf7a5 100644
--- a/demos/gtk-demo/constraints.ui
+++ b/demos/gtk-demo/constraints.ui
@@ -12,14 +12,6 @@
                      nat-width="100" nat-height="10"
                      max-width="200" max-height="20"
                      strength="strong"/>
-              <constraint target="button1" target-attribute="start"
-                          relation="ge"
-                          constant="0"
-                          strength="required"/>
-              <constraint target="button1" target-attribute="top"
-                          relation="ge"
-                          constant="0"
-                          strength="required"/>
               <constraint target="button1" target-attribute="width"
                           relation="le"
                           constant="200"
@@ -41,20 +33,20 @@
                           relation="eq"
                           source="button2" source-attribute="start"
                           strength="required"/>
-              <constraint target="button2" target-attribute="end"
+              <constraint target="super" target-attribute="end"
                           relation="eq"
-                          source="super" source-attribute="end"
-                          constant="-8"
+                          source="button2" source-attribute="end"
+                          constant="8"
                           strength="required"/>
               <constraint target="super" target-attribute="start"
                           relation="eq"
                           source="button3" source-attribute="start"
                           constant="-8"
                           strength="required"/>
-              <constraint target="button3" target-attribute="end"
+              <constraint target="super" target-attribute="end"
                           relation="eq"
-                          source="super" source-attribute="end"
-                          constant="-8"
+                          source="button3" source-attribute="end"
+                          constant="8"
                           strength="required"/>
               <constraint target="super" target-attribute="top"
                           relation="eq"
@@ -84,10 +76,10 @@
                           relation="eq"
                           source="button2" source-attribute="height"
                           strength="required"/>
-              <constraint target="button3" target-attribute="bottom"
+              <constraint target="super" target-attribute="bottom"
                           relation="eq"
-                          source="super" source-attribute="bottom"
-                          constant="-8"
+                          source="button3" source-attribute="bottom"
+                          constant="8"
                           strength="required"/>
             </constraints>
           </object>
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]