From ab8fb2b63d80d91363c62b86d0dce3b72e5574c6 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 20 Oct 2023 21:32:37 +0200 Subject: [PATCH] Set a minimal split offset when the FilesystemDock changes split modes. --- editor/filesystem_dock.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 165f5f8bc2..4f327a63ec 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -470,6 +470,10 @@ void FileSystemDock::_notification(int p_what) { SplitMode new_split_mode = SplitMode(int(EditorSettings::get_singleton()->get("docks/filesystem/split_mode"))); if (new_split_mode != split_mode) { set_split_mode(new_split_mode); + + if (split_box->get_split_offset() < 100 * EDSCALE) { + split_box->set_split_offset(100 * EDSCALE); + } } // Change full tree mode. @@ -3113,6 +3117,8 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { _update_display_mode(true); + split_box->set_split_offset(200 * EDSCALE); + file_list_display_mode = FILE_LIST_DISPLAY_THUMBNAILS; always_show_folders = false;