popover for property appearing in the right place.
authorAlan <alan@roojs.com>
Wed, 17 Aug 2022 08:45:49 +0000 (16:45 +0800)
committerAlan <alan@roojs.com>
Wed, 17 Aug 2022 08:45:49 +0000 (16:45 +0800)
src/Builder4/PopoverProperty.bjs
src/Builder4/PopoverProperty.vala
src/Builder4/WindowLeftProps.vala

index a01b8a1..e856221 100644 (file)
@@ -5,7 +5,7 @@
    "# JsRender.NodeProp? prop" : "",
    "$ xns" : "Gtk",
    "@ void success" : "(Project.Project pr, JsRender.JsRender file)",
-   "Gtk.PositionType position" : "Gtk.PositionType.LEFT",
+   "Gtk.PositionType position" : "Gtk.PositionType.RIGHT",
    "JsRender.Node node" : "",
    "Xcls_MainWindow mainwindow" : "null",
    "bool done" : false,
     "\tthis.el.set_modal(true);",
     "\tthis.el.set_relative_to(btn);",
     "\tif (y > -1) {",
+    "\t\t",
+    "\t",
     "\t\tvar  r = Gdk.Rectangle() {",
-    "\t\t\tx = 0, // align left...",
+    "\t\t\tx = btn.get_allocated_width(), // align left...",
     "\t\t\ty = y,",
     "\t\t\twidth = 1,",
     "\t\t\theight = 1",
index d72fa93..920a278 100644 (file)
@@ -45,7 +45,7 @@ public class Xcls_PopoverProperty : Object
         // set gobject values
         this.el.border_width = 0;
         this.el.modal = true;
-        this.el.position = Gtk.PositionType.LEFT;
+        this.el.position = Gtk.PositionType.RIGHT;
         var child_0 = new Xcls_Box2( _this );
         child_0.ref();
         this.el.add(  child_0.el );
@@ -148,8 +148,10 @@ public class Xcls_PopoverProperty : Object
        this.el.set_modal(true);
        this.el.set_relative_to(btn);
        if (y > -1) {
+               
+       
                var  r = Gdk.Rectangle() {
-                       x = 0, // align left...
+                       x = btn.get_allocated_width(), // align left...
                        y = y,
                        width = 1,
                        height = 1
index 4a976dc..02b7502 100644 (file)
@@ -1618,7 +1618,7 @@ public class Xcls_LeftProps : Object
         {
             _this = _owner;
             _this.model = this;
-            this.el = new Gtk.TreeStore( 5,      typeof(JsRender.NodeProp),  // 0 key type
+            this.el = new Gtk.TreeStore.newv(  {      typeof(JsRender.NodeProp),  // 0 key type
      typeof(string),  // 1 display_key
      typeof(string),  // 2 display_value
      typeof(string),  // 3 display_tooltip
@@ -1631,7 +1631,7 @@ public class Xcls_LeftProps : Object
             4, "0 " + prop.name
             
         ); 
-        */ );
+        */ }  );
 
             // my vars (dec)
 
@@ -1839,7 +1839,7 @@ public class Xcls_LeftProps : Object
         {
             _this = _owner;
             _this.valrendermodel = this;
-            this.el = new Gtk.ListStore( 1, typeof(string) );
+            this.el = new Gtk.ListStore.newv(  { typeof(string) }  );
 
             // my vars (dec)