Repository: godotengine/godot
File: editor/docks/scene_tree_dock.cpp (C++)

Code before:

		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
			if (EditorSettings::get_singleton()->check_changed_settings_in_group("docks/scene_tree")) {
				scene_tree->set_auto_expand_selected(EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), false);
				scene_tree->set_hide_filtered_out_parents(EDITOR_GET("docks/scene_tree/hide_filtered_out_parents"), false);
				scene_tree->set_accessibility_warnings(EDITOR_GET("docks/scene_tree/accessibility_warnings"), false);
			}
			if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor")) {
				inspect_hovered_node_delay->set_wait_time(EDITOR_GET("interface/editor/dragging_hover_wait_seconds"));
			}
		} break;

		case NOTIFICATION_THEME_CHANGED: {
			button_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
			button_instance->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
			button_create_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptCreate")));
			button_detach_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptRemove")));
			button_extend_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptExtend")));
			button_tree_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));

			filter->set_right_icon(get_editor_theme_icon(SNAME("Search")));

			PopupMenu *filter_menu = filter->get_menu();
			filter_menu->set_item_icon(filter_menu->get_item_idx_from_text(TTR("Filters")), get_editor_theme_icon(SNAME("Search")));
			filter_menu->set_item_icon(filter_menu->get_item_index(FILTER_BY_TYPE), get_editor_theme_icon(SNAME("Node")));
			filter_menu->set_item_icon(filter_menu->get_item_index(FILTER_BY_GROUP), get_editor_theme_icon(SNAME("Groups")));

			// These buttons are created on READY, because reasons...
			if (button_2d) {
				button_2d->set_button_icon(get_editor_theme_icon(SNAME("Node2D")));
			}
			if (button_3d) {
				button_3d->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
			}
			if (button_ui) {
				button_ui->set_button_icon(get_editor_theme_icon(SNAME("Control")));
			}
			if (button_custom) {
				button_custom->set_button_icon(get_editor_theme_icon(SNAME("Add")));
			}
			if (button_clipboard) {
				button_clipboard->set_button_icon(get_editor_theme_icon(SNAME("ActionPaste")));
			}

			menu_subresources->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
		} break;

		case NOTIFICATION_PROCESS: {
			bool show_create_root = bool(EDITOR_GET("interface/editors/show_scene_tree_root_selection")) && get_tree()->get_edited_scene_root() == nullptr;

			if (show_create_root != create_root_dialog->is_visible_in_tree() && !remote_tree->is_visible()) {

Review comment (security):
> Icons are removed. Together with the checkbox above, they create confusing empty spaces.

They don't have to since https://github.com/godotengine/godot/pull/112545 . As the original author, I do like the icons...

Code after:

		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
			if (EditorSettings::get_singleton()->check_changed_settings_in_group("docks/scene_tree")) {
				scene_tree->set_auto_expand_selected(EDITOR_GET("docks/scene_tree/auto_expand_to_selected"), false);
				scene_tree->set_hide_filtered_out_parents(EDITOR_GET("docks/scene_tree/hide_filtered_out_parents"), false);
				scene_tree->set_accessibility_warnings(EDITOR_GET("docks/scene_tree/accessibility_warnings"), false);
			}
			if (EditorSettings::get_singleton()->check_changed_settings_in_group("interface/editor")) {
				inspect_hovered_node_delay->set_wait_time(EDITOR_GET("interface/editor/dragging_hover_wait_seconds"));
			}
		} break;

		case NOTIFICATION_THEME_CHANGED: {
			button_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
			button_instance->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
			button_create_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptCreate")));
			button_detach_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptRemove")));
			button_extend_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptExtend")));
			button_tree_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));

			filter->set_right_icon(get_editor_theme_icon(SNAME("Search")));

			// These buttons are created on READY, because reasons...
			if (button_2d) {
				button_2d->set_button_icon(get_editor_theme_icon(SNAME("Node2D")));
			}
			if (button_3d) {
				button_3d->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
			}
			if (button_ui) {
				button_ui->set_button_icon(get_editor_theme_icon(SNAME("Control")));
			}
			if (button_custom) {
				button_custom->set_button_icon(get_editor_theme_icon(SNAME("Add")));
			}
			if (button_clipboard) {
				button_clipboard->set_button_icon(get_editor_theme_icon(SNAME("ActionPaste")));
			}

			menu_subresources->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
		} break;

		case NOTIFICATION_PROCESS: {
			bool show_create_root = bool(EDITOR_GET("interface/editors/show_scene_tree_root_selection")) && get_tree()->get_edited_scene_root() == nullptr;

			if (show_create_root != create_root_dialog->is_visible_in_tree() && !remote_tree->is_visible()) {
				if (show_create_root) {
					create_root_dialog->show();
					scene_tree->hide();
				} else {
					create_root_dialog->hide();