diff options
author | Nong Van Tinh <vannongtinh@gmail.com> | 2022-08-18 09:20:00 +0700 |
---|---|---|
committer | Nong Van Tinh <vannongtinh@gmail.com> | 2022-08-18 09:20:00 +0700 |
commit | b9ab4b372f1084b2e87f3c28af377f4db32ace46 (patch) | |
tree | 9c8335c5779355efd5e1da9b8cd8d67323e3f1ba /editor | |
parent | dbd15243621ec595742b18abc4c26f3cb2e00f3d (diff) |
Fixed inspector resource preview shows up with incorrect size
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_resource_picker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp index e5c1836205..f606459bad 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -106,7 +106,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const preview_rect->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size"); thumbnail_size *= EDSCALE; - assign_button->set_custom_minimum_size(Size2(MIN(1, assign_button_min_size.x), MIN(thumbnail_size, assign_button_min_size.y))); + assign_button->set_custom_minimum_size(Size2(MAX(1, assign_button_min_size.x), MAX(thumbnail_size, assign_button_min_size.y))); } preview_rect->set_texture(p_preview); |