From 41b7196ad4516d0b9892de676c85031e05a21cf9 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 21 Jul 2024 05:59:01 +0200 Subject: [PATCH] Fix incorrect Curve editor preview thumbnail scaling `EDSCALE` scaling was applied even though it shouldn't be, which led to pixelated thumbnails due to double scaling. For reference, AudioStream previews don't use `EDSCALE` and look fine at any editor scale (the editor itself already scales the thumbnail requests). --- editor/plugins/curve_editor_plugin.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index e54d0c0d1ae..180de700b7b 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -1071,11 +1071,10 @@ Ref CurvePreviewGenerator::generate(const Ref &p_from, cons return Ref(); } - Size2 thumbnail_size = p_size * EDSCALE; Ref img_ref; img_ref.instantiate(); Image &im = **img_ref; - im.initialize_data(thumbnail_size.x, thumbnail_size.y, false, Image::FORMAT_RGBA8); + im.initialize_data(p_size.x, p_size.y, false, Image::FORMAT_RGBA8); Color line_color = EditorInterface::get_singleton()->get_editor_theme()->get_color(SceneStringName(font_color), EditorStringName(Editor));