1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #64938 from YuriSizov/editor-scaled-icons

This commit is contained in:
Rémi Verschelde
2022-09-09 16:52:32 +02:00
committed by GitHub
7 changed files with 167 additions and 62 deletions

View File

@@ -3377,6 +3377,8 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor, bool p_config_changed
Ref<Texture2D> icon = p_editor->get_icon();
if (icon.is_valid()) {
tb->set_icon(icon);
// Make sure the control is updated if the icon is reimported.
icon->connect("changed", callable_mp((Control *)tb, &Control::update_minimum_size));
} else if (singleton->gui_base->has_theme_icon(p_editor->get_name(), SNAME("EditorIcons"))) {
tb->set_icon(singleton->gui_base->get_theme_icon(p_editor->get_name(), SNAME("EditorIcons")));
}