From 26671e7407d8dfe5ee11f82814cb74212e6af2ab Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 30 Sep 2021 18:01:53 +0200 Subject: [PATCH] Use a yellow color for editable children properties instead of red This matches the usual "Changes may be lost!" warning color. --- doc/classes/EditorProperty.xml | 2 +- editor/editor_inspector.cpp | 2 +- editor/editor_themes.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index fd916f871d5..2c4e020e4f2 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -66,7 +66,7 @@ Used by the inspector, set to [code]true[/code] when the property is checked. - Used by the inspector, set to [code]true[/code] when the property must draw with error color. This is used for editable children's properties. + Used by the inspector, set to [code]true[/code] when the property is drawn with the editor theme's warning color. This is used for editable children's properties. Used by the inspector, set to [code]true[/code] when the property can add keys for animation. diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index e0f7ab15943..a6eeb2c5e97 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -209,7 +209,7 @@ void EditorProperty::_notification(int p_what) { Color color; if (draw_red) { - color = get_color("error_color"); + color = get_color("warning_color"); } else { color = get_color("property_color"); } diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 220842103b6..1d333d649f4 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -769,7 +769,7 @@ Ref create_editor_theme(const Ref p_theme) { theme->set_stylebox("bg_selected", "EditorProperty", style_property_bg); theme->set_stylebox("bg", "EditorProperty", Ref(memnew(StyleBoxEmpty))); theme->set_constant("vseparation", "EditorProperty", (extra_spacing + default_margin_size) * EDSCALE); - theme->set_color("error_color", "EditorProperty", error_color); + theme->set_color("warning_color", "EditorProperty", warning_color); theme->set_color("property_color", "EditorProperty", property_color); theme->set_constant("inspector_margin", "Editor", 8 * EDSCALE);