Merge pull request #57040 from YeldhamDev/drag_script_fix

Fix icon in drag preview of scripts/docs
This commit is contained in:
Rémi Verschelde 2022-01-21 18:18:41 +01:00 committed by GitHub
commit 3a41bf0e04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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