You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Fix asset library video play overlay not being centered on the thumbnail
This commit is contained in:
@@ -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> overlay = get_icon("PlayOverlay", "EditorIcons")->get_data();
|
||||||
Ref<Image> thumbnail = p_image->get_data();
|
Ref<Image> thumbnail = p_image->get_data();
|
||||||
thumbnail = thumbnail->duplicate();
|
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.
|
// Overlay and thumbnail need the same format for `blend_rect` to work.
|
||||||
thumbnail->convert(Image::FORMAT_RGBA8);
|
thumbnail->convert(Image::FORMAT_RGBA8);
|
||||||
|
|||||||
Reference in New Issue
Block a user