diff options
author | Eric Rybicki <info@ericrybicki.com> | 2020-01-21 08:04:32 +0100 |
---|---|---|
committer | Eric Rybicki <info@ericrybicki.com> | 2020-01-21 08:04:32 +0100 |
commit | 99346e96540ffd1e08161aec807cf84b71c9278b (patch) | |
tree | 37441115d1e04e572611803c93cda9d4bfde2349 | |
parent | 1508cc405168736b6d7c2fb117e6e4bc72a8afe6 (diff) |
Fix asset library video play overlay not being centered on the thumbnail
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index c1f62e8342..4f73a5eaea 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<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) / 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); |