diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-19 07:14:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 07:14:50 +0200 |
commit | 47ab209b55092599d18705592a3c92b81a7a592d (patch) | |
tree | 12463cf8d1e23f4dd3b8d032f835066d7c76fe24 /editor/plugins | |
parent | 20a3bb9c484431439ffa60a158d7563c466cd530 (diff) | |
parent | ddf83d93b31003c54c05d2cb2e266cf305fbaa55 (diff) |
Merge pull request #30684 from Calinou/improve-assetlib-image-display
Improve preview and screenshot display in the asset library
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 16f24c3c3a..31b11d8bea 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -177,6 +177,8 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const tex->create_from_image(thumbnail); preview_images[i].button->set_icon(tex); + // Make it clearer that clicking it will open an external link + preview_images[i].button->set_default_cursor_shape(CURSOR_POINTING_HAND); } else { preview_images[i].button->set_icon(p_image); } @@ -755,7 +757,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt float scale_ratio = max_height / (image->get_height() * EDSCALE); if (scale_ratio < 1) { - image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_CUBIC); + image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_LANCZOS); } } break; case IMAGE_QUEUE_SCREENSHOT: { @@ -763,7 +765,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt float scale_ratio = max_height / (image->get_height() * EDSCALE); if (scale_ratio < 1) { - image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_CUBIC); + image->resize(image->get_width() * EDSCALE * scale_ratio, image->get_height() * EDSCALE * scale_ratio, Image::INTERPOLATE_LANCZOS); } } break; } @@ -1270,9 +1272,8 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const if (p.has("thumbnail")) { _request_image(description->get_instance_id(), p["thumbnail"], IMAGE_QUEUE_THUMBNAIL, i); } - if (is_video) { - //_request_image(description->get_instance_id(),p["link"],IMAGE_QUEUE_SCREENSHOT,i); - } else { + + if (!is_video) { _request_image(description->get_instance_id(), p["link"], IMAGE_QUEUE_SCREENSHOT, i); } } |