1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Fix pixelized previews, but also instances of breaking ImageTexture cache. Closes #25378.

This commit is contained in:
Juan Linietsky
2019-01-27 13:39:16 -03:00
parent b494de34aa
commit a089061120
5 changed files with 13 additions and 1 deletions

View File

@@ -174,6 +174,7 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
if (preview_images[i].is_video) {
Ref<Image> overlay = get_icon("PlayOverlay", "EditorIcons")->get_data();
Ref<Image> thumbnail = p_image->get_data();
thumbnail = thumbnail->duplicate();
Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2);
thumbnail->lock();