diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-03-12 09:37:40 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-03-26 15:49:42 +0100 |
commit | 441f1a5fe9a3bf0e4e5dab578f793500b1ff6e3d (patch) | |
tree | 6421bcc3235e6fdcd726244ac7d455886e17734b /modules | |
parent | 543fb1c4dadd75914d595b089820aef42e691075 (diff) |
Popups are now windows also (broken!)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/gdnative_library_editor_plugin.cpp | 24 | ||||
-rw-r--r-- | modules/gdnavigation/navigation_mesh_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/editor/gdscript_highlighter.cpp | 10 | ||||
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 166 | ||||
-rw-r--r-- | modules/visual_script/visual_script_editor.h | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_property_selector.cpp | 64 |
7 files changed, 140 insertions, 140 deletions
diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index e2f1fc81ac..9b4c3c794e 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -77,9 +77,9 @@ void GDNativeLibraryEditor::_update_tree() { platform->set_text(0, E->get().name); platform->set_metadata(0, E->get().library_extension); - platform->set_custom_bg_color(0, get_color("prop_category", "Editor")); - platform->set_custom_bg_color(1, get_color("prop_category", "Editor")); - platform->set_custom_bg_color(2, get_color("prop_category", "Editor")); + platform->set_custom_bg_color(0, get_theme_color("prop_category", "Editor")); + platform->set_custom_bg_color(1, get_theme_color("prop_category", "Editor")); + platform->set_custom_bg_color(2, get_theme_color("prop_category", "Editor")); platform->set_selectable(0, false); platform->set_expand_right(0, true); @@ -91,31 +91,31 @@ void GDNativeLibraryEditor::_update_tree() { bit->set_text(0, it->get()); bit->set_metadata(0, target); bit->set_selectable(0, false); - bit->set_custom_bg_color(0, get_color("prop_subsection", "Editor")); + bit->set_custom_bg_color(0, get_theme_color("prop_subsection", "Editor")); - bit->add_button(1, get_icon("Folder", "EditorIcons"), BUTTON_SELECT_LIBRARY, false, TTR("Select the dynamic library for this entry")); + bit->add_button(1, get_theme_icon("Folder", "EditorIcons"), BUTTON_SELECT_LIBRARY, false, TTR("Select the dynamic library for this entry")); String file = entry_configs[target].library; if (!file.empty()) { - bit->add_button(1, get_icon("Clear", "EditorIcons"), BUTTON_CLEAR_LIBRARY, false, TTR("Clear")); + bit->add_button(1, get_theme_icon("Clear", "EditorIcons"), BUTTON_CLEAR_LIBRARY, false, TTR("Clear")); } bit->set_text(1, file); - bit->add_button(2, get_icon("Folder", "EditorIcons"), BUTTON_SELECT_DEPENDENCES, false, TTR("Select dependencies of the library for this entry")); + bit->add_button(2, get_theme_icon("Folder", "EditorIcons"), BUTTON_SELECT_DEPENDENCES, false, TTR("Select dependencies of the library for this entry")); Array files = entry_configs[target].dependencies; if (files.size()) { - bit->add_button(2, get_icon("Clear", "EditorIcons"), BUTTON_CLEAR_DEPENDENCES, false, TTR("Clear")); + bit->add_button(2, get_theme_icon("Clear", "EditorIcons"), BUTTON_CLEAR_DEPENDENCES, false, TTR("Clear")); } bit->set_text(2, Variant(files)); - bit->add_button(3, get_icon("MoveUp", "EditorIcons"), BUTTON_MOVE_UP, false, TTR("Move Up")); - bit->add_button(3, get_icon("MoveDown", "EditorIcons"), BUTTON_MOVE_DOWN, false, TTR("Move Down")); - bit->add_button(3, get_icon("Remove", "EditorIcons"), BUTTON_ERASE_ENTRY, false, TTR("Remove current entry")); + bit->add_button(3, get_theme_icon("MoveUp", "EditorIcons"), BUTTON_MOVE_UP, false, TTR("Move Up")); + bit->add_button(3, get_theme_icon("MoveDown", "EditorIcons"), BUTTON_MOVE_DOWN, false, TTR("Move Down")); + bit->add_button(3, get_theme_icon("Remove", "EditorIcons"), BUTTON_ERASE_ENTRY, false, TTR("Remove current entry")); } TreeItem *new_arch = tree->create_item(platform); new_arch->set_text(0, TTR("Double click to create a new entry")); new_arch->set_text_align(0, TreeItem::ALIGN_CENTER); - new_arch->set_custom_color(0, get_color("accent_color", "Editor")); + new_arch->set_custom_color(0, get_theme_color("accent_color", "Editor")); new_arch->set_expand_right(0, true); new_arch->set_metadata(1, E->key()); diff --git a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp index ba55b13088..05feb97131 100644 --- a/modules/gdnavigation/navigation_mesh_editor_plugin.cpp +++ b/modules/gdnavigation/navigation_mesh_editor_plugin.cpp @@ -50,8 +50,8 @@ void NavigationMeshEditor::_notification(int p_option) { if (p_option == NOTIFICATION_ENTER_TREE) { - button_bake->set_icon(get_icon("Bake", "EditorIcons")); - button_reset->set_icon(get_icon("Reload", "EditorIcons")); + button_bake->set_icon(get_theme_icon("Bake", "EditorIcons")); + button_reset->set_icon(get_theme_icon("Reload", "EditorIcons")); } } diff --git a/modules/gdscript/editor/gdscript_highlighter.cpp b/modules/gdscript/editor/gdscript_highlighter.cpp index 687e1785be..0aca4dbc5e 100644 --- a/modules/gdscript/editor/gdscript_highlighter.cpp +++ b/modules/gdscript/editor/gdscript_highlighter.cpp @@ -358,11 +358,11 @@ List<String> GDScriptSyntaxHighlighter::get_supported_languages() { } void GDScriptSyntaxHighlighter::_update_cache() { - font_color = text_editor->get_color("font_color"); - symbol_color = text_editor->get_color("symbol_color"); - function_color = text_editor->get_color("function_color"); - number_color = text_editor->get_color("number_color"); - member_color = text_editor->get_color("member_variable_color"); + font_color = text_editor->get_theme_color("font_color"); + symbol_color = text_editor->get_theme_color("symbol_color"); + function_color = text_editor->get_theme_color("function_color"); + number_color = text_editor->get_theme_color("number_color"); + member_color = text_editor->get_theme_color("member_variable_color"); const String text_editor_color_theme = EditorSettings::get_singleton()->get("text_editor/theme/color_theme"); const bool default_theme = text_editor_color_theme == "Default"; diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index dc624f6087..1917a69388 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -1147,8 +1147,8 @@ void GridMapEditor::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: { - options->set_icon(get_icon("GridMap", "EditorIcons")); - search_box->set_right_icon(get_icon("Search", "EditorIcons")); + options->set_icon(get_theme_icon("GridMap", "EditorIcons")); + search_box->set_right_icon(get_theme_icon("Search", "EditorIcons")); } break; } } @@ -1227,7 +1227,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { floor->set_min(-32767); floor->set_max(32767); floor->set_step(1); - floor->get_line_edit()->add_constant_override("minimum_spaces", 16); + floor->get_line_edit()->add_theme_constant_override("minimum_spaces", 16); spatial_editor_hb->add_child(floor); floor->connect("value_changed", callable_mp(this, &GridMapEditor::_floor_changed)); @@ -1305,14 +1305,14 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) { mode_thumbnail = memnew(ToolButton); mode_thumbnail->set_toggle_mode(true); mode_thumbnail->set_pressed(true); - mode_thumbnail->set_icon(p_editor->get_gui_base()->get_icon("FileThumbnail", "EditorIcons")); + mode_thumbnail->set_icon(p_editor->get_gui_base()->get_theme_icon("FileThumbnail", "EditorIcons")); hb->add_child(mode_thumbnail); mode_thumbnail->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode), varray(DISPLAY_THUMBNAIL)); mode_list = memnew(ToolButton); mode_list->set_toggle_mode(true); mode_list->set_pressed(false); - mode_list->set_icon(p_editor->get_gui_base()->get_icon("FileList", "EditorIcons")); + mode_list->set_icon(p_editor->get_gui_base()->get_theme_icon("FileList", "EditorIcons")); hb->add_child(mode_list); mode_list->connect("pressed", callable_mp(this, &GridMapEditor::_set_display_mode), varray(DISPLAY_LIST)); diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 94f1448ae4..19771ef373 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -504,36 +504,36 @@ void VisualScriptEditor::_update_graph(int p_only_id) { select_func_text->hide(); Ref<Texture2D> type_icons[Variant::VARIANT_MAX] = { - Control::get_icon("Variant", "EditorIcons"), - Control::get_icon("bool", "EditorIcons"), - Control::get_icon("int", "EditorIcons"), - Control::get_icon("float", "EditorIcons"), - Control::get_icon("String", "EditorIcons"), - Control::get_icon("Vector2", "EditorIcons"), - Control::get_icon("Rect2", "EditorIcons"), - Control::get_icon("Vector3", "EditorIcons"), - Control::get_icon("Transform2D", "EditorIcons"), - Control::get_icon("Plane", "EditorIcons"), - Control::get_icon("Quat", "EditorIcons"), - Control::get_icon("AABB", "EditorIcons"), - Control::get_icon("Basis", "EditorIcons"), - Control::get_icon("Transform", "EditorIcons"), - Control::get_icon("Color", "EditorIcons"), - Control::get_icon("NodePath", "EditorIcons"), - Control::get_icon("RID", "EditorIcons"), - Control::get_icon("MiniObject", "EditorIcons"), - Control::get_icon("Dictionary", "EditorIcons"), - Control::get_icon("Array", "EditorIcons"), - Control::get_icon("PackedByteArray", "EditorIcons"), - Control::get_icon("PackedInt32Array", "EditorIcons"), - Control::get_icon("PackedFloat32Array", "EditorIcons"), - Control::get_icon("PackedStringArray", "EditorIcons"), - Control::get_icon("PackedVector2Array", "EditorIcons"), - Control::get_icon("PackedVector3Array", "EditorIcons"), - Control::get_icon("PackedColorArray", "EditorIcons") + Control::get_theme_icon("Variant", "EditorIcons"), + Control::get_theme_icon("bool", "EditorIcons"), + Control::get_theme_icon("int", "EditorIcons"), + Control::get_theme_icon("float", "EditorIcons"), + Control::get_theme_icon("String", "EditorIcons"), + Control::get_theme_icon("Vector2", "EditorIcons"), + Control::get_theme_icon("Rect2", "EditorIcons"), + Control::get_theme_icon("Vector3", "EditorIcons"), + Control::get_theme_icon("Transform2D", "EditorIcons"), + Control::get_theme_icon("Plane", "EditorIcons"), + Control::get_theme_icon("Quat", "EditorIcons"), + Control::get_theme_icon("AABB", "EditorIcons"), + Control::get_theme_icon("Basis", "EditorIcons"), + Control::get_theme_icon("Transform", "EditorIcons"), + Control::get_theme_icon("Color", "EditorIcons"), + Control::get_theme_icon("NodePath", "EditorIcons"), + Control::get_theme_icon("RID", "EditorIcons"), + Control::get_theme_icon("MiniObject", "EditorIcons"), + Control::get_theme_icon("Dictionary", "EditorIcons"), + Control::get_theme_icon("Array", "EditorIcons"), + Control::get_theme_icon("PackedByteArray", "EditorIcons"), + Control::get_theme_icon("PackedInt32Array", "EditorIcons"), + Control::get_theme_icon("PackedFloat32Array", "EditorIcons"), + Control::get_theme_icon("PackedStringArray", "EditorIcons"), + Control::get_theme_icon("PackedVector2Array", "EditorIcons"), + Control::get_theme_icon("PackedVector3Array", "EditorIcons"), + Control::get_theme_icon("PackedColorArray", "EditorIcons") }; - Ref<Texture2D> seq_port = Control::get_icon("VisualShaderPort", "EditorIcons"); + Ref<Texture2D> seq_port = Control::get_theme_icon("VisualShaderPort", "EditorIcons"); for (List<StringName>::Element *F = funcs.front(); F; F = F->next()) { // loop through all the functions @@ -596,7 +596,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { LineEdit *line_edit = memnew(LineEdit); line_edit->set_text(node->get_text()); line_edit->set_expand_to_text_length(true); - line_edit->add_font_override("font", get_font("source", "EditorFonts")); + line_edit->add_theme_font_override("font", get_theme_font("source", "EditorFonts")); gnode->add_child(line_edit); line_edit->connect("text_changed", callable_mp(this, &VisualScriptEditor::_expression_text_changed), varray(E->get())); } else { @@ -637,14 +637,14 @@ void VisualScriptEditor::_update_graph(int p_only_id) { mono_color.a = 0.85; c = mono_color; } - gnode->add_color_override("title_color", c); + gnode->add_theme_color_override("title_color", c); c.a = 0.7; - gnode->add_color_override("close_color", c); - gnode->add_color_override("resizer_color", ic); - gnode->add_style_override("frame", sbf); + gnode->add_theme_color_override("close_color", c); + gnode->add_theme_color_override("resizer_color", ic); + gnode->add_theme_style_override("frame", sbf); } - const Color mono_color = get_color("mono_color", "Editor"); + const Color mono_color = get_theme_color("mono_color", "Editor"); int slot_idx = 0; @@ -750,7 +750,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { } Button *rmbtn = memnew(Button); - rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); + rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Remove", "EditorIcons")); hbc->add_child(rmbtn); rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_input_port), varray(E->get(), i), CONNECT_DEFERRED); } else { @@ -812,7 +812,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { if (is_vslist) { Button *rmbtn = memnew(Button); - rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); + rmbtn->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Remove", "EditorIcons")); hbc->add_child(rmbtn); rmbtn->connect("pressed", callable_mp(this, &VisualScriptEditor::_remove_output_port), varray(E->get(), i), CONNECT_DEFERRED); @@ -856,7 +856,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { gnode->add_child(vbc); - bool dark_theme = get_constant("dark_theme", "Editor"); + bool dark_theme = get_theme_constant("dark_theme", "Editor"); if (i < mixed_seq_ports) { gnode->set_slot(slot_idx, left_ok, left_type, _color_from_type(left_type, dark_theme), true, TYPE_SEQUENCE, mono_color, Ref<Texture2D>(), seq_port); } else { @@ -940,9 +940,9 @@ void VisualScriptEditor::_update_members() { TreeItem *functions = members->create_item(root); functions->set_selectable(0, false); functions->set_text(0, TTR("Functions:")); - functions->add_button(0, Control::get_icon("Override", "EditorIcons"), 1, false, TTR("Override an existing built-in function.")); - functions->add_button(0, Control::get_icon("Add", "EditorIcons"), 0, false, TTR("Create a new function.")); - functions->set_custom_color(0, Control::get_color("mono_color", "Editor")); + functions->add_button(0, Control::get_theme_icon("Override", "EditorIcons"), 1, false, TTR("Override an existing built-in function.")); + functions->add_button(0, Control::get_theme_icon("Add", "EditorIcons"), 0, false, TTR("Create a new function.")); + functions->set_custom_color(0, Control::get_theme_color("mono_color", "Editor")); List<StringName> func_names; script->get_function_list(&func_names); @@ -956,7 +956,7 @@ void VisualScriptEditor::_update_members() { ti->set_text(0, E->get()); ti->set_selectable(0, true); ti->set_metadata(0, E->get()); - ti->add_button(0, Control::get_icon("Edit", "EditorIcons"), 0); + ti->add_button(0, Control::get_theme_icon("Edit", "EditorIcons"), 0); if (selected == E->get()) ti->select(0); } @@ -964,37 +964,37 @@ void VisualScriptEditor::_update_members() { TreeItem *variables = members->create_item(root); variables->set_selectable(0, false); variables->set_text(0, TTR("Variables:")); - variables->add_button(0, Control::get_icon("Add", "EditorIcons"), -1, false, TTR("Create a new variable.")); - variables->set_custom_color(0, Control::get_color("mono_color", "Editor")); + variables->add_button(0, Control::get_theme_icon("Add", "EditorIcons"), -1, false, TTR("Create a new variable.")); + variables->set_custom_color(0, Control::get_theme_color("mono_color", "Editor")); Ref<Texture2D> type_icons[Variant::VARIANT_MAX] = { - Control::get_icon("Variant", "EditorIcons"), - Control::get_icon("bool", "EditorIcons"), - Control::get_icon("int", "EditorIcons"), - Control::get_icon("float", "EditorIcons"), - Control::get_icon("String", "EditorIcons"), - Control::get_icon("Vector2", "EditorIcons"), - Control::get_icon("Rect2", "EditorIcons"), - Control::get_icon("Vector3", "EditorIcons"), - Control::get_icon("Transform2D", "EditorIcons"), - Control::get_icon("Plane", "EditorIcons"), - Control::get_icon("Quat", "EditorIcons"), - Control::get_icon("AABB", "EditorIcons"), - Control::get_icon("Basis", "EditorIcons"), - Control::get_icon("Transform", "EditorIcons"), - Control::get_icon("Color", "EditorIcons"), - Control::get_icon("NodePath", "EditorIcons"), - Control::get_icon("RID", "EditorIcons"), - Control::get_icon("MiniObject", "EditorIcons"), - Control::get_icon("Dictionary", "EditorIcons"), - Control::get_icon("Array", "EditorIcons"), - Control::get_icon("PackedByteArray", "EditorIcons"), - Control::get_icon("PackedInt32Array", "EditorIcons"), - Control::get_icon("PackedFloat32Array", "EditorIcons"), - Control::get_icon("PackedStringArray", "EditorIcons"), - Control::get_icon("PackedVector2Array", "EditorIcons"), - Control::get_icon("PackedVector3Array", "EditorIcons"), - Control::get_icon("PackedColorArray", "EditorIcons") + Control::get_theme_icon("Variant", "EditorIcons"), + Control::get_theme_icon("bool", "EditorIcons"), + Control::get_theme_icon("int", "EditorIcons"), + Control::get_theme_icon("float", "EditorIcons"), + Control::get_theme_icon("String", "EditorIcons"), + Control::get_theme_icon("Vector2", "EditorIcons"), + Control::get_theme_icon("Rect2", "EditorIcons"), + Control::get_theme_icon("Vector3", "EditorIcons"), + Control::get_theme_icon("Transform2D", "EditorIcons"), + Control::get_theme_icon("Plane", "EditorIcons"), + Control::get_theme_icon("Quat", "EditorIcons"), + Control::get_theme_icon("AABB", "EditorIcons"), + Control::get_theme_icon("Basis", "EditorIcons"), + Control::get_theme_icon("Transform", "EditorIcons"), + Control::get_theme_icon("Color", "EditorIcons"), + Control::get_theme_icon("NodePath", "EditorIcons"), + Control::get_theme_icon("RID", "EditorIcons"), + Control::get_theme_icon("MiniObject", "EditorIcons"), + Control::get_theme_icon("Dictionary", "EditorIcons"), + Control::get_theme_icon("Array", "EditorIcons"), + Control::get_theme_icon("PackedByteArray", "EditorIcons"), + Control::get_theme_icon("PackedInt32Array", "EditorIcons"), + Control::get_theme_icon("PackedFloat32Array", "EditorIcons"), + Control::get_theme_icon("PackedStringArray", "EditorIcons"), + Control::get_theme_icon("PackedVector2Array", "EditorIcons"), + Control::get_theme_icon("PackedVector3Array", "EditorIcons"), + Control::get_theme_icon("PackedColorArray", "EditorIcons") }; List<StringName> var_names; @@ -1017,8 +1017,8 @@ void VisualScriptEditor::_update_members() { TreeItem *_signals = members->create_item(root); _signals->set_selectable(0, false); _signals->set_text(0, TTR("Signals:")); - _signals->add_button(0, Control::get_icon("Add", "EditorIcons"), -1, false, TTR("Create a new signal.")); - _signals->set_custom_color(0, Control::get_color("mono_color", "Editor")); + _signals->add_button(0, Control::get_theme_icon("Add", "EditorIcons"), -1, false, TTR("Create a new signal.")); + _signals->set_custom_color(0, Control::get_theme_color("mono_color", "Editor")); List<StringName> signal_names; script->get_custom_signal_list(&signal_names); @@ -1034,12 +1034,12 @@ void VisualScriptEditor::_update_members() { String base_type = script->get_instance_base_type(); String icon_type = base_type; - if (!Control::has_icon(base_type, "EditorIcons")) { + if (!Control::has_theme_icon(base_type, "EditorIcons")) { icon_type = "Object"; } base_type_select->set_text(base_type); - base_type_select->set_icon(Control::get_icon(icon_type, "EditorIcons")); + base_type_select->set_icon(Control::get_theme_icon(icon_type, "EditorIcons")); updating_members = false; } @@ -1252,7 +1252,7 @@ void VisualScriptEditor::_add_func_input() { hbox->add_child(type_box); Button *delete_button = memnew(Button); - delete_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("Remove", "EditorIcons")); + delete_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_theme_icon("Remove", "EditorIcons")); delete_button->set_tooltip(vformat(TTR("Delete input port"))); hbox->add_child(delete_button); @@ -2377,7 +2377,7 @@ void VisualScriptEditor::_draw_color_over_button(Object *obj, Color p_color) { if (!button) return; - Ref<StyleBox> normal = get_stylebox("normal", "Button"); + Ref<StyleBox> normal = get_theme_stylebox("normal", "Button"); button->draw_rect(Rect2(normal->get_offset(), button->get_size() - normal->get_minimum_size()), p_color); } @@ -2459,9 +2459,9 @@ String VisualScriptEditor::get_name() { return name; } -Ref<Texture2D> VisualScriptEditor::get_icon() { +Ref<Texture2D> VisualScriptEditor::get_theme_icon() { - return Control::get_icon("VisualScript", "EditorIcons"); + return Control::get_theme_icon("VisualScript", "EditorIcons"); } bool VisualScriptEditor::is_unsaved() { @@ -3925,9 +3925,9 @@ void VisualScriptEditor::_notification(int p_what) { return; } - edit_variable_edit->add_style_override("bg", get_stylebox("bg", "Tree")); - edit_signal_edit->add_style_override("bg", get_stylebox("bg", "Tree")); - func_input_scroll->add_style_override("bg", get_stylebox("bg", "Tree")); + edit_variable_edit->add_theme_style_override("bg", get_theme_stylebox("bg", "Tree")); + edit_signal_edit->add_theme_style_override("bg", get_theme_stylebox("bg", "Tree")); + func_input_scroll->add_theme_style_override("bg", get_theme_stylebox("bg", "Tree")); Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme(); @@ -4479,9 +4479,9 @@ void VisualScriptEditor::_member_rmb_selected(const Vector2 &p_pos) { TreeItem *root = members->get_root(); - Ref<Texture2D> del_icon = Control::get_icon("Remove", "EditorIcons"); + Ref<Texture2D> del_icon = Control::get_theme_icon("Remove", "EditorIcons"); - Ref<Texture2D> edit_icon = Control::get_icon("Edit", "EditorIcons"); + Ref<Texture2D> edit_icon = Control::get_theme_icon("Edit", "EditorIcons"); if (ti->get_parent() == root->get_children()) { diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h index 79388e7298..d9494e4d04 100644 --- a/modules/visual_script/visual_script_editor.h +++ b/modules/visual_script/visual_script_editor.h @@ -298,7 +298,7 @@ public: virtual Vector<String> get_functions(); virtual void reload_text(); virtual String get_name(); - virtual Ref<Texture2D> get_icon(); + virtual Ref<Texture2D> get_theme_icon(); virtual bool is_unsaved(); virtual Variant get_edit_state(); virtual void set_edit_state(const Variant &p_state); diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index c12eda683a..d749e3257a 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -99,35 +99,35 @@ void VisualScriptPropertySelector::_update_search() { List<PropertyInfo> props; TreeItem *category = NULL; Ref<Texture2D> type_icons[Variant::VARIANT_MAX] = { - vbc->get_icon("Variant", "EditorIcons"), - vbc->get_icon("bool", "EditorIcons"), - vbc->get_icon("int", "EditorIcons"), - vbc->get_icon("float", "EditorIcons"), - vbc->get_icon("String", "EditorIcons"), - vbc->get_icon("Vector2", "EditorIcons"), - vbc->get_icon("Rect2", "EditorIcons"), - vbc->get_icon("Vector3", "EditorIcons"), - vbc->get_icon("Transform2D", "EditorIcons"), - vbc->get_icon("Plane", "EditorIcons"), - vbc->get_icon("Quat", "EditorIcons"), - vbc->get_icon("AABB", "EditorIcons"), - vbc->get_icon("Basis", "EditorIcons"), - vbc->get_icon("Transform", "EditorIcons"), - vbc->get_icon("Color", "EditorIcons"), - vbc->get_icon("Path", "EditorIcons"), - vbc->get_icon("RID", "EditorIcons"), - vbc->get_icon("Object", "EditorIcons"), - vbc->get_icon("Dictionary", "EditorIcons"), - vbc->get_icon("Array", "EditorIcons"), - vbc->get_icon("PackedByteArray", "EditorIcons"), - vbc->get_icon("PackedInt32Array", "EditorIcons"), - vbc->get_icon("PackedFloat32Array", "EditorIcons"), - vbc->get_icon("PackedInt64Array", "EditorIcons"), - vbc->get_icon("PackedFloat64Array", "EditorIcons"), - vbc->get_icon("PackedStringArray", "EditorIcons"), - vbc->get_icon("PackedVector2Array", "EditorIcons"), - vbc->get_icon("PackedVector3Array", "EditorIcons"), - vbc->get_icon("PackedColorArray", "EditorIcons") + vbc->get_theme_icon("Variant", "EditorIcons"), + vbc->get_theme_icon("bool", "EditorIcons"), + vbc->get_theme_icon("int", "EditorIcons"), + vbc->get_theme_icon("float", "EditorIcons"), + vbc->get_theme_icon("String", "EditorIcons"), + vbc->get_theme_icon("Vector2", "EditorIcons"), + vbc->get_theme_icon("Rect2", "EditorIcons"), + vbc->get_theme_icon("Vector3", "EditorIcons"), + vbc->get_theme_icon("Transform2D", "EditorIcons"), + vbc->get_theme_icon("Plane", "EditorIcons"), + vbc->get_theme_icon("Quat", "EditorIcons"), + vbc->get_theme_icon("AABB", "EditorIcons"), + vbc->get_theme_icon("Basis", "EditorIcons"), + vbc->get_theme_icon("Transform", "EditorIcons"), + vbc->get_theme_icon("Color", "EditorIcons"), + vbc->get_theme_icon("Path", "EditorIcons"), + vbc->get_theme_icon("RID", "EditorIcons"), + vbc->get_theme_icon("Object", "EditorIcons"), + vbc->get_theme_icon("Dictionary", "EditorIcons"), + vbc->get_theme_icon("Array", "EditorIcons"), + vbc->get_theme_icon("PackedByteArray", "EditorIcons"), + vbc->get_theme_icon("PackedInt32Array", "EditorIcons"), + vbc->get_theme_icon("PackedFloat32Array", "EditorIcons"), + vbc->get_theme_icon("PackedInt64Array", "EditorIcons"), + vbc->get_theme_icon("PackedFloat64Array", "EditorIcons"), + vbc->get_theme_icon("PackedStringArray", "EditorIcons"), + vbc->get_theme_icon("PackedVector2Array", "EditorIcons"), + vbc->get_theme_icon("PackedVector3Array", "EditorIcons"), + vbc->get_theme_icon("PackedColorArray", "EditorIcons") }; { String b = String(E->get()); @@ -252,7 +252,7 @@ void VisualScriptPropertySelector::_update_search() { TreeItem *item = search_options->create_item(category ? category : root); item->set_text(0, desc); - item->set_icon(0, vbc->get_icon("MemberMethod", "EditorIcons")); + item->set_icon(0, vbc->get_theme_icon("MemberMethod", "EditorIcons")); item->set_metadata(0, name); item->set_selectable(0, true); @@ -316,7 +316,7 @@ void VisualScriptPropertySelector::create_visualscript_item(const String &name, if (search_input == String() || text.findn(search_input) != -1) { TreeItem *item = search_options->create_item(root); item->set_text(0, text); - item->set_icon(0, vbc->get_icon("VisualScript", "EditorIcons")); + item->set_icon(0, vbc->get_theme_icon("VisualScript", "EditorIcons")); item->set_metadata(0, name); item->set_metadata(1, "action"); item->set_selectable(0, true); @@ -399,7 +399,7 @@ void VisualScriptPropertySelector::get_visual_node_names(const String &root_filt } item->set_text(0, type_name + String("").join(desc)); - item->set_icon(0, vbc->get_icon("VisualScript", "EditorIcons")); + item->set_icon(0, vbc->get_theme_icon("VisualScript", "EditorIcons")); item->set_selectable(0, true); item->set_metadata(0, E->get()); item->set_selectable(0, true); |