@@ -489,7 +489,11 @@ void FileSystemDock::_update_display_mode(bool p_force) {
489489 button_toggle_display_mode->set_button_icon (get_editor_theme_icon (SNAME (" Panels1" )));
490490 tree->show ();
491491 tree->set_v_size_flags (SIZE_EXPAND_FILL);
492- toolbar2_hbc->show ();
492+ if (horizontal) {
493+ toolbar2_hbc->hide ();
494+ } else {
495+ toolbar2_hbc->show ();
496+ }
493497
494498 _update_tree (get_uncollapsed_paths ());
495499 file_list_vb->hide ();
@@ -4019,12 +4023,14 @@ MenuButton *FileSystemDock::_create_file_menu_button() {
40194023}
40204024
40214025void FileSystemDock::update_layout (EditorDock::DockLayout p_layout) {
4022- bool horizontal = p_layout == EditorDock::DOCK_LAYOUT_HORIZONTAL;
4026+ horizontal = p_layout == EditorDock::DOCK_LAYOUT_HORIZONTAL;
40234027 if (button_dock_placement->is_visible () == horizontal) {
40244028 return ;
40254029 }
40264030
40274031 if (horizontal) {
4032+ path_hb->reparent (toolbar_hbc, false );
4033+ toolbar_hbc->move_child (path_hb, 2 );
40284034 set_meta (" _dock_display_mode" , get_display_mode ());
40294035 set_meta (" _dock_file_display_mode" , get_file_list_display_mode ());
40304036
@@ -4035,6 +4041,8 @@ void FileSystemDock::update_layout(EditorDock::DockLayout p_layout) {
40354041 set_file_list_display_mode (new_file_display_mode);
40364042 set_custom_minimum_size (Size2 (0 , 200 ) * EDSCALE);
40374043 } else {
4044+ path_hb->reparent (file_list_vb);
4045+ file_list_vb->move_child (path_hb, 0 );
40384046 set_meta (" _bottom_display_mode" , get_display_mode ());
40394047 set_meta (" _bottom_file_display_mode" , get_file_list_display_mode ());
40404048
@@ -4180,7 +4188,7 @@ FileSystemDock::FileSystemDock() {
41804188 VBoxContainer *top_vbc = memnew (VBoxContainer);
41814189 main_vb->add_child (top_vbc);
41824190
4183- HBoxContainer * toolbar_hbc = memnew (HBoxContainer);
4191+ toolbar_hbc = memnew (HBoxContainer);
41844192 top_vbc->add_child (toolbar_hbc);
41854193
41864194 HBoxContainer *nav_hbc = memnew (HBoxContainer);
@@ -4276,6 +4284,7 @@ FileSystemDock::FileSystemDock() {
42764284 split_box->add_child (file_list_vb);
42774285
42784286 path_hb = memnew (HBoxContainer);
4287+ path_hb->set_h_size_flags (SIZE_EXPAND_FILL);
42794288 file_list_vb->add_child (path_hb);
42804289
42814290 file_list_search_box = memnew (LineEdit);
0 commit comments