diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 1f8969d691..4311567d50 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -534,6 +534,7 @@ void FileSystemDock::_notification(int p_what) { current_path_line_edit->connect(SceneStringName(text_submitted), callable_mp(this, &FileSystemDock::_navigate_to_path).bind(false)); always_show_folders = bool(EDITOR_GET("docks/filesystem/always_show_folders")); + thumbnail_size_setting = EDITOR_GET("docks/filesystem/thumbnail_size"); set_file_list_display_mode(FileSystemDock::FILE_LIST_DISPLAY_LIST); @@ -636,6 +637,12 @@ void FileSystemDock::_notification(int p_what) { do_redraw = true; } + int new_thumbnail_size_setting = EDITOR_GET("docks/filesystem/thumbnail_size"); + if (new_thumbnail_size_setting != thumbnail_size_setting) { + thumbnail_size_setting = new_thumbnail_size_setting; + do_redraw = true; + } + if (do_redraw) { update_all(); } @@ -938,8 +945,7 @@ void FileSystemDock::_update_file_list(bool p_keep_selection) { String directory = current_path; String file = ""; - int thumbnail_size = EDITOR_GET("docks/filesystem/thumbnail_size"); - thumbnail_size *= EDSCALE; + int thumbnail_size = thumbnail_size_setting * EDSCALE; Ref folder_thumbnail; Ref file_thumbnail; Ref file_thumbnail_broken; diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index bd90f945b6..69c0489226 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -203,6 +203,7 @@ private: CreateDialog *new_resource_dialog = nullptr; bool always_show_folders = false; + int thumbnail_size_setting = 0; bool editor_is_dark_theme = false;