From 83831156665cc7cc9770bea81ce17b8322e1355e Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Fri, 21 Jan 2022 13:00:02 -0300 Subject: [PATCH] Fix icon in drag preview of scripts/docs --- editor/plugins/script_editor_plugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index d2a09b3c307..6ef5d27ff1a 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2794,6 +2794,7 @@ Variant ScriptEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from) { if (!preview_icon.is_null()) { TextureRect *tf = memnew(TextureRect); tf->set_texture(preview_icon); + tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED); drag_preview->add_child(tf); } Label *label = memnew(Label(preview_name));