You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
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).
This commit is contained in:
@@ -1071,11 +1071,10 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
|
|||||||
return Ref<Texture2D>();
|
return Ref<Texture2D>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Size2 thumbnail_size = p_size * EDSCALE;
|
|
||||||
Ref<Image> img_ref;
|
Ref<Image> img_ref;
|
||||||
img_ref.instantiate();
|
img_ref.instantiate();
|
||||||
Image &im = **img_ref;
|
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));
|
Color line_color = EditorInterface::get_singleton()->get_editor_theme()->get_color(SceneStringName(font_color), EditorStringName(Editor));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user