Set a minimal split offset when the FilesystemDock changes split modes.

This commit is contained in:
Relintai 2023-10-20 21:32:37 +02:00
parent 4b29c01fdc
commit ab8fb2b63d

View File

@ -470,6 +470,10 @@ void FileSystemDock::_notification(int p_what) {
SplitMode new_split_mode = SplitMode(int(EditorSettings::get_singleton()->get("docks/filesystem/split_mode"))); SplitMode new_split_mode = SplitMode(int(EditorSettings::get_singleton()->get("docks/filesystem/split_mode")));
if (new_split_mode != split_mode) { if (new_split_mode != split_mode) {
set_split_mode(new_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. // Change full tree mode.
@ -3113,6 +3117,8 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
_update_display_mode(true); _update_display_mode(true);
split_box->set_split_offset(200 * EDSCALE);
file_list_display_mode = FILE_LIST_DISPLAY_THUMBNAILS; file_list_display_mode = FILE_LIST_DISPLAY_THUMBNAILS;
always_show_folders = false; always_show_folders = false;