You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Stretch image on resize in asset description dialog
(cherry picked from commit 924658a849)
This commit is contained in:
@@ -291,12 +291,15 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
|
|||||||
hbox->add_child(previews_vbox);
|
hbox->add_child(previews_vbox);
|
||||||
previews_vbox->add_constant_override("separation", 15 * EDSCALE);
|
previews_vbox->add_constant_override("separation", 15 * EDSCALE);
|
||||||
previews_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
previews_vbox->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
previews_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
preview = memnew(TextureRect);
|
preview = memnew(TextureRect);
|
||||||
previews_vbox->add_child(preview);
|
previews_vbox->add_child(preview);
|
||||||
preview->set_expand(true);
|
preview->set_expand(true);
|
||||||
preview->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
|
preview->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
|
||||||
preview->set_custom_minimum_size(Size2(640 * EDSCALE, 345 * EDSCALE));
|
preview->set_custom_minimum_size(Size2(640 * EDSCALE, 345 * EDSCALE));
|
||||||
|
preview->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
preview->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
previews_bg = memnew(PanelContainer);
|
previews_bg = memnew(PanelContainer);
|
||||||
previews_vbox->add_child(previews_bg);
|
previews_vbox->add_child(previews_bg);
|
||||||
|
|||||||
Reference in New Issue
Block a user