Fix #8025 - move css to resources
[roobuilder] / src / Builder4 / WindowRooView.bjs
index 9ceb803..04ef48f 100644 (file)
            "# bool button_is_pressed" : false,
            "# bool key_is_pressed" : false,
            "# bool loading" : true,
-           "# bool show_line_marks" : true,
            "# id" : "sourceview",
            "# int editable_start_pos" : "-1",
            "# string prop_selected" : "\"\"",
            "* init" : [
             "\t{",
             "",
-            "\tthis.css = new Gtk.CssProvider();",
-            "\t ",
-            "\tthis.css.load_from_string(",
-            "\t\t\"#roo-view { font:  10px monospace; }\"",
-            "\t);",
-            "",
-            "\tGtk.StyleContext.add_provider_for_display(",
-            "\t\tthis.el.get_display(),",
-            "\t\tthis.css,",
-            "\t\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            "\t);",
-            "\t\t",
             "\t ",
             "",
             "\tthis.loading = true;",
            ],
            "* pack" : "set_child",
            "bool editable" : false,
+           "bool show_line_marks" : true,
            "bool show_line_numbers" : true,
+           "css_classes" : "{ \"code-editor\" }",
            "items" : [
             {
              "$ xns" : "GtkSource",
             "    ",
             " ",
             "    buf.set_text(\"\",0);",
-            "    var sbuf = (GtkSource.Buffer) buf;",
+            " ",
             "",
             "    ",
             "",
          "items" : [
           {
            "$ xns" : "Gtk",
-           "* init" : [
-            "this.css = new Gtk.CssProvider();",
-            " ",
-            "this.css.load_from_string(",
-            "\t\"#roo-search-entry { background-color: #ccc; }\"",
-            ");",
-            " ",
-            "Gtk.StyleContext.add_provider_for_display(",
-            "\tthis.el.get_display(),",
-            "\tthis.css,",
-            "\tGtk.STYLE_PROVIDER_PRIORITY_APPLICATION",
-            ");",
-            "\t\t",
-            "\t ",
-            " ",
-            ""
-           ],
-           "Gtk.CssProvider? css" : "null",
            "bool hexpand" : true,
            "id" : "search_entry",
            "items" : [