diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-18 10:45:53 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-07-18 10:45:53 +0200 |
commit | 6b5825a0cb13494d2d26a72f59a81399a7209461 (patch) | |
tree | 939ff63517fcef88b71894cc6c1b4527bdf9db09 | |
parent | ceb1801db2843b87a00655b2ff152511edc14c1c (diff) | |
parent | 5f4f088552e930ff927eaf4e88ca1e8ec1f944d1 (diff) | |
download | redot-engine-6b5825a0cb13494d2d26a72f59a81399a7209461.tar.gz |
Merge pull request #94494 from ckaiser/better-curve-preview
Improve Curve preview colors for consistency
-rw-r--r-- | editor/plugins/curve_editor_plugin.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 041778d634..e54d0c0d1a 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -1077,10 +1077,8 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons Image &im = **img_ref; im.initialize_data(thumbnail_size.x, thumbnail_size.y, false, Image::FORMAT_RGBA8); - Color bg_color(0.1, 0.1, 0.1, 1.0); - Color line_color(0.8, 0.8, 0.8, 1.0); + Color line_color = EditorInterface::get_singleton()->get_editor_theme()->get_color(SceneStringName(font_color), EditorStringName(Editor)); - im.fill(bg_color); // Set the first pixel of the thumbnail. float v = (curve->sample_baked(0) - curve->get_min_value()) / curve->get_range(); int y = CLAMP(im.get_height() - v * im.get_height(), 0, im.get_height() - 1); |