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

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

index 9ececf3..cc70b9a 100644 (file)
           },
           {
            "$ 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",
+           "bool vexpand" : true,
            "id" : "codeeditviewbox",
            "xtype" : "Box"
           }
index 9ab3b7f..14fca6a 100644 (file)
@@ -577,6 +577,30 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
+            this.el.vexpand = true;
+
+            // 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