src/Builder4/GtkView.bjs
authorAlan <alan@roojs.com>
Thu, 8 Feb 2024 08:19:51 +0000 (16:19 +0800)
committerAlan <alan@roojs.com>
Thu, 8 Feb 2024 08:19:51 +0000 (16:19 +0800)
src/Builder4/GtkView.vala

src/Builder4/GtkView.bjs
src/Builder4/GtkView.vala

index 686de3f..583b2f7 100644 (file)
            ],
            "* pack" : "set_child",
            "Gtk.CssProvider css" : "",
-           "bool zallow_node_scroll" : true,
+           "css_classes" : " \"code-editor\" }",
            "gboolean editable" : false,
            "gboolean show_line_marks" : true,
            "gboolean show_line_numbers" : true,
index 6131dd6..1b007a2 100644 (file)
@@ -617,7 +617,6 @@ public class Xcls_GtkView : Object
 
                        // my vars (def)
                public bool loading;
-               public bool zallow_node_scroll;
                public string prop_selected;
                public Gtk.CssProvider css;
                public JsRender.Node? node_selected;
@@ -631,7 +630,6 @@ public class Xcls_GtkView : Object
 
                        // my vars (dec)
                        this.loading = false;
-                       this.zallow_node_scroll = true;
                        this.prop_selected = "";
 
                        // set gobject values
@@ -639,6 +637,7 @@ public class Xcls_GtkView : Object
                        this.el.editable = false;
                        this.el.show_line_marks = true;
                        this.el.show_line_numbers = true;
+                       this.el.css_classes =  "code-editor" };
                        this.el.tab_width = 4;
                        new Xcls_buffer( _this );
                        this.el.set_buffer ( _this.buffer.el  );