src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Wed, 25 May 2022 03:08:31 +0000 (11:08 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 25 May 2022 03:08:31 +0000 (11:08 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index 3db00a2..c0de2a3 100644 (file)
            "$ xns" : "Gtk",
            "* pack" : "add",
            "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
+           "bool vexpand" : true,
            "id" : "rooviewbox",
            "xtype" : "Box"
           },
           {
            "$ xns" : "Gtk",
+           "* init" : [
+            "{",
+            "   ",
+            "   /*",
+            "    this.el.add_constraint(",
+            "        new Clutter.AlignConstraint(",
+            "            _this.clutterembed.el.get_stage(), ",
+            "            Clutter.AlignAxis.X_AXIS,",
+            "            0.0f",
+            "        )",
+            "    );",
+            "    */",
+            "    this.el.fixed_x = 50.0f;",
+            "    this.el.fixed_y = 0.0f;",
+            "    //this.el.set_position(100,100);",
+            "    this.el.set_pivot_point(0.0f,0.0f);",
+            "    this.el.set_scale(0.0f,1.0f);",
+            "    this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,",
+            "            _this.clutterembed.el.get_stage().height);",
+            "            ",
+            "}"
+           ],
            "* pack" : "add",
            "Gtk.Orientation orientation" : "Gtk.Orientation.VERTICAL",
            "id" : "codeeditviewbox",
index 0637a89..5a124c0 100644 (file)
@@ -553,6 +553,7 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.vexpand = true;
         }
 
         // user defined functions
@@ -576,6 +577,29 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
+
+            // init method
+
+            {
+               
+               /*
+                this.el.add_constraint(
+                    new Clutter.AlignConstraint(
+                        _this.clutterembed.el.get_stage(), 
+                        Clutter.AlignAxis.X_AXIS,
+                        0.0f
+                    )
+                );
+                */
+                this.el.fixed_x = 50.0f;
+                this.el.fixed_y = 0.0f;
+                //this.el.set_position(100,100);
+                this.el.set_pivot_point(0.0f,0.0f);
+                this.el.set_scale(0.0f,1.0f);
+                this.el.set_size((_this.clutterembed.el.get_stage().width-50)/2,
+                        _this.clutterembed.el.get_stage().height);
+                        
+            }
         }
 
         // user defined functions