From 99346e96540ffd1e08161aec807cf84b71c9278b Mon Sep 17 00:00:00 2001 From: Eric Rybicki Date: Tue, 21 Jan 2020 08:04:32 +0100 Subject: [PATCH] Fix asset library video play overlay not being centered on the thumbnail --- editor/plugins/asset_library_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index c1f62e8342f..4f73a5eaeaa 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -162,7 +162,7 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const Ref overlay = get_icon("PlayOverlay", "EditorIcons")->get_data(); Ref thumbnail = p_image->get_data(); thumbnail = thumbnail->duplicate(); - Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width() / 2) / 2, (thumbnail->get_height() - overlay->get_height() / 2) / 2); + Point2 overlay_pos = Point2((thumbnail->get_width() - overlay->get_width()) / 2, (thumbnail->get_height() - overlay->get_height()) / 2); // Overlay and thumbnail need the same format for `blend_rect` to work. thumbnail->convert(Image::FORMAT_RGBA8);