diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-24 11:17:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 11:17:49 +0100 |
commit | da551bbf2ddfda8e7b41091a4ebb89452d007962 (patch) | |
tree | 3df7f724de9b767e2326c8e4f0e0d717a99f7363 | |
parent | 573121ca7f591c9cabded548ffece1b2d34eb20a (diff) | |
parent | 0efbd13d8a3949ce081e24e12e029bbd4bfe2796 (diff) |
Merge pull request #46133 from aaronfranke/gray
Change fallback icon for abstract nodes to have a grayed out color
-rw-r--r-- | editor/create_dialog.cpp | 4 | ||||
-rw-r--r-- | editor/icons/NodeDisabled.svg | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 3a63100012..a9ed1bc2b9 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -236,7 +236,10 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String bool can_instance = (p_cpp_type && ClassDB::can_instance(p_type)) || !p_cpp_type; if (!can_instance) { r_item->set_custom_color(0, search_options->get_theme_color("disabled_font_color", "Editor")); + r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, "NodeDisabled")); r_item->set_selectable(0, false); + } else { + r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback)); } if (search_box->get_text() != "") { @@ -253,7 +256,6 @@ void CreateDialog::_configure_search_option_item(TreeItem *r_item, const String const String &description = DTR(EditorHelp::get_doc_data()->class_list[p_type].brief_description); r_item->set_tooltip(0, description); - r_item->set_icon(0, EditorNode::get_singleton()->get_class_icon(p_type, icon_fallback)); if (!p_cpp_type && !script_type) { Ref<Texture2D> icon = EditorNode::get_editor_data().get_custom_types()[custom_type_parents[p_type]][custom_type_indices[p_type]].icon; diff --git a/editor/icons/NodeDisabled.svg b/editor/icons/NodeDisabled.svg new file mode 100644 index 0000000000..b2d51fc4fb --- /dev/null +++ b/editor/icons/NodeDisabled.svg @@ -0,0 +1 @@ +<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6 6 6 0 0 0 -6-6zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4-4 4 4 0 0 1 4-4z" fill="#999"/></svg> |