Godot Engine – Multi-platform 2D and 3D game engine
Remove unneeded `MarginContainer` from the FileSystem dock
Michael Alexsander0f2470fbad69
diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cppindex c34f6f39dd8..73473601db1 100644--- a/editor/docks/filesystem_dock.cpp+++ b/editor/docks/filesystem_dock.cpp@@ -542,7 +542,6 @@ void FileSystemDock::_update_display_mode(bool p_force) {files->set_theme_type_variation("ItemListSecondary");files->set_scroll_hint_mode(ItemList::SCROLL_HINT_MODE_DISABLED);- files_mc->set_theme_type_variation("");toolbar2_hbc->hide();button_file_list_display_mode->show();@@ -4653,11 +4652,6 @@ FileSystemDock::FileSystemDock() {file_list_button_sort = _create_file_menu_button();path_hb->add_child(file_list_button_sort);- files_mc = memnew(MarginContainer);- file_list_vb->add_child(files_mc);- files_mc->set_theme_type_variation("NoBorderHorizontalBottom");- files_mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);-bottom_toolbar_hbc = memnew(HBoxContainer);bottom_toolbar_hbc->set_alignment(BoxContainer::ALIGNMENT_END);file_list_vb->add_child(bottom_toolbar_hbc);@@ -4690,15 +4684,16 @@ FileSystemDock::FileSystemDock() {files->set_accessibility_name(TTRC("Files"));files->set_select_mode(ItemList::SELECT_MULTI);files->set_scroll_hint_mode(ItemList::SCROLL_HINT_MODE_TOP);+ files->set_allow_rmb_select(true);+ files->set_custom_minimum_size(Size2(0, 15 * EDSCALE));+ files->set_v_size_flags(Control::SIZE_EXPAND_FILL);SET_DRAG_FORWARDING_GCD(files, FileSystemDock);files->connect("item_clicked", callable_mp(this, &FileSystemDock::_file_list_item_clicked));files->connect(SceneStringName(gui_input), callable_mp(this, &FileSystemDock::_file_list_gui_input));files->connect("multi_selected", callable_mp(this, &FileSystemDock::_file_multi_selected));files->connect("empty_clicked", callable_mp(this, &FileSystemDock::_file_list_empty_clicked));files->connect("item_edited", callable_mp(this, &FileSystemDock::_rename_operation_confirm).bind(false));- files->set_custom_minimum_size(Size2(0, 15 * EDSCALE));- files->set_allow_rmb_select(true);- files_mc->add_child(files);+ file_list_vb->add_child(files);scanning_vb = memnew(VBoxContainer);scanning_vb->hide();diff --git a/editor/docks/filesystem_dock.h b/editor/docks/filesystem_dock.hindex f071b47db71..d0cddd0030e 100644--- a/editor/docks/filesystem_dock.h+++ b/editor/docks/filesystem_dock.h@@ -157,7 +157,6 @@ private:ProgressBar *scanning_progress = nullptr;SplitContainer *split_box = nullptr;MarginContainer *tree_mc = nullptr;- MarginContainer *files_mc = nullptr;VBoxContainer *file_list_vb = nullptr;int split_box_offset_h = 0;