You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Use the gray color for all abstract classes
This commit is contained in:
@@ -4330,9 +4330,19 @@ Ref<Texture2D> EditorNode::_get_class_or_script_icon(const String &p_class, cons
|
||||
return gui_base->get_theme_icon(p_class, SNAME("EditorIcons"));
|
||||
}
|
||||
|
||||
if (p_fallback.length() && gui_base->has_theme_icon(p_fallback, SNAME("EditorIcons"))) {
|
||||
if (!p_fallback.is_empty() && gui_base->has_theme_icon(p_fallback, SNAME("EditorIcons"))) {
|
||||
return gui_base->get_theme_icon(p_fallback, SNAME("EditorIcons"));
|
||||
}
|
||||
|
||||
// If the fallback is empty or wasn't found, use the default fallback.
|
||||
if (ClassDB::class_exists(p_class)) {
|
||||
bool instantiable = !ClassDB::is_virtual(p_class) && ClassDB::can_instantiate(p_class);
|
||||
if (ClassDB::is_parent_class(p_class, SNAME("Node"))) {
|
||||
return gui_base->get_theme_icon(instantiable ? "Node" : "NodeDisabled", SNAME("EditorIcons"));
|
||||
} else {
|
||||
return gui_base->get_theme_icon(instantiable ? "Object" : "ObjectDisabled", SNAME("EditorIcons"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user