diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-28 22:57:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-28 22:57:33 +0200 |
commit | 9efa5a8fc9ce6bfc375511ebe1deeec7ad5ef42a (patch) | |
tree | 0935a0b8d7a8ada2956b9af9fe0e076716523115 /editor | |
parent | cb62d319387c74b517897a06b30410916085753a (diff) | |
parent | b9ab4b372f1084b2e87f3c28af377f4db32ace46 (diff) |
Merge pull request #64555 from nongvantinh/inspector_resource_preview_incorrect_size
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 19c8ff2d9e..78ed71400c 100644 --- a/editor/editor_resource_picker.cpp +++ b/editor/editor_resource_picker.cpp @@ -108,7 +108,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); |