Fix icon in drag preview of scripts/docs

This commit is contained in:
Michael Alexsander 2022-01-21 13:00:02 -03:00
parent a257ceb53d
commit 8383115666

View file

@ -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));