Skip to content

Commit 5f4f088

Browse files
committed
Improve Curve preview colors for consistency
1 parent da4f6e4 commit 5f4f088

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

editor/plugins/curve_editor_plugin.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,10 +1077,8 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
10771077
Image &im = **img_ref;
10781078
im.initialize_data(thumbnail_size.x, thumbnail_size.y, false, Image::FORMAT_RGBA8);
10791079

1080-
Color bg_color(0.1, 0.1, 0.1, 1.0);
1081-
Color line_color(0.8, 0.8, 0.8, 1.0);
1080+
Color line_color = EditorInterface::get_singleton()->get_editor_theme()->get_color(SceneStringName(font_color), EditorStringName(Editor));
10821081

1083-
im.fill(bg_color);
10841082
// Set the first pixel of the thumbnail.
10851083
float v = (curve->sample_baked(0) - curve->get_min_value()) / curve->get_range();
10861084
int y = CLAMP(im.get_height() - v * im.get_height(), 0, im.get_height() - 1);

0 commit comments

Comments
 (0)