summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-01-21 18:18:41 +0100
committerGitHub <noreply@github.com>2022-01-21 18:18:41 +0100
commit3a41bf0e044915ca45440901e9beeea81c3d5505 (patch)
tree13a7b345ed3d2c51b8b7ff2f76ec55aef07eb1b2
parentd7851b079e90c34fddd457eb5057c944c8a6d443 (diff)
parent83831156665cc7cc9770bea81ce17b8322e1355e (diff)
Merge pull request #57040 from YeldhamDev/drag_script_fix
Fix icon in drag preview of scripts/docs
-rw-r--r--editor/plugins/script_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index d2a09b3c30..6ef5d27ff1 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));