Tweak editor status colors (success, warning, error)

Some of the previous colors were "overbright" in the sense that
some of their components were above 1, causing font anti-aliasing
to look bad.

These new colors should be easier on the eyes while fitting better
with the rest of the editor's color palette.
This commit is contained in:
Hugo Locurcio 2018-12-15 18:06:26 +01:00
parent 814d6cad13
commit 1e56b4dd62
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -351,18 +351,18 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("mono_color", "Editor", mono_color); theme->set_color("mono_color", "Editor", mono_color);
Color success_color = accent_color.linear_interpolate(Color(0.2, 1, 0.2), 0.6) * 1.2; Color success_color = Color(0.45, 0.95, 0.5);
Color warning_color = accent_color.linear_interpolate(Color(1, 1, 0), 0.7) * 1.0; Color warning_color = Color(1, 0.87, 0.4);
Color error_color = accent_color.linear_interpolate(Color(1, 0, 0), 0.8) * 1.7; Color error_color = Color(1, 0.47, 0.42);
Color property_color = font_color.linear_interpolate(Color(0.5, 0.5, 0.5), 0.5); Color property_color = font_color.linear_interpolate(Color(0.5, 0.5, 0.5), 0.5);
if (!dark_theme) { if (!dark_theme) {
// yellow on white themes is a P.I.T.A. // Darken some colors to be readable on a light background
warning_color = accent_color.linear_interpolate(Color(0.9, 0.7, 0), 0.9); success_color = success_color.linear_interpolate(mono_color, 0.35);
warning_color = warning_color.linear_interpolate(mono_color, 0.2); warning_color = warning_color.linear_interpolate(mono_color, 0.35);
success_color = success_color.linear_interpolate(mono_color, 0.2); error_color = error_color.linear_interpolate(mono_color, 0.25);
error_color = error_color.linear_interpolate(mono_color, 0.2);
} }
theme->set_color("success_color", "Editor", success_color); theme->set_color("success_color", "Editor", success_color);
theme->set_color("warning_color", "Editor", warning_color); theme->set_color("warning_color", "Editor", warning_color);
theme->set_color("error_color", "Editor", error_color); theme->set_color("error_color", "Editor", error_color);