1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Add expand modes to TextureRect

This commit is contained in:
kobewi
2022-02-25 01:19:24 +01:00
parent caf94f244e
commit dfc4367a47
13 changed files with 86 additions and 28 deletions

View File

@@ -293,7 +293,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
preview = memnew(TextureRect);
previews_vbox->add_child(preview);
preview->set_ignore_texture_size(true);
preview->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
preview->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
preview->set_custom_minimum_size(Size2(640 * EDSCALE, 345 * EDSCALE));
preview->set_v_size_flags(Control::SIZE_EXPAND_FILL);