Skip to content

Commit

Permalink
Set a minimal split offset when the FilesystemDock changes split modes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Oct 20, 2023
1 parent 4b29c01 commit ab8fb2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editor/filesystem_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ab8fb2b

Please sign in to comment.