src/Builder4/PopoverEditor.bjs
authorAlan <alan@roojs.com>
Fri, 13 May 2022 04:23:14 +0000 (12:23 +0800)
committerAlan <alan@roojs.com>
Fri, 13 May 2022 04:23:14 +0000 (12:23 +0800)
src/Builder4/PopoverEditor.vala

src/Builder4/PopoverEditor.bjs
src/Builder4/PopoverEditor.vala

index d1dc52f..4f840cc 100644 (file)
@@ -40,7 +40,7 @@
     "(Gtk.Widget on_el, JsRender.JsRender file, JsRender.Node? node, string ptype, string key) {",
     "\tthis.editor.show( file, node, ptype, key);",
     "\t",
-    "    int w,h, ww, hh;",
+    "    int w,h;",
     "    this.win.el.get_size(out w, out h);",
     "    ",
     "    // left tree = 250, editor area = 500?",
@@ -48,7 +48,7 @@
     "    // min 450?",
     "\t// max hieght ...",
     "\t",
-    "\ton_el.get_size(out ww, out hh);",
+    "\tvar  ww =  on_el.get_allocated_width();",
     "\t",
     "\t// width = should be max = w-ww , or 600 at best..?",
     "\t",
index 24063b1..10104bd 100644 (file)
@@ -54,7 +54,7 @@ public class Xcls_PopoverEditor : Object
     public void show (Gtk.Widget on_el, JsRender.JsRender file, JsRender.Node? node, string ptype, string key) {
        this.editor.show( file, node, ptype, key);
        
-        int w,h, ww, hh;
+        int w,h;
         this.win.el.get_size(out w, out h);
         
         // left tree = 250, editor area = 500?
@@ -62,7 +62,7 @@ public class Xcls_PopoverEditor : Object
         // min 450?
        // max hieght ...
        
-       on_el.get_size(out ww, out hh);
+       var  ww =  on_el.get_allocated_width();
        
        // width = should be max = w-ww , or 600 at best..?