diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-21 08:20:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 08:20:35 +0100 |
commit | 4bc98c105ddf053e1e61a536270ae4fc2d32e89e (patch) | |
tree | 0544d06d12d5fbbc3b4ea949ecfd3a8cdc543818 /editor | |
parent | a9487821102b006d9afb05dee3be78a7e4ed8023 (diff) | |
parent | 99346e96540ffd1e08161aec807cf84b71c9278b (diff) |
Merge pull request #35394 from ericrybick/fix-assetlib-thumbnail-overlay-
Fix asset library video play overlay not being centered on the thumbnail
Diffstat (limited to 'editor')
-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); |