Use a yellow color for editable children properties instead of red

This matches the usual "Changes may be lost!" warning color.
This commit is contained in:
Hugo Locurcio 2021-09-30 18:01:53 +02:00
parent 7c9e06f936
commit 26671e7407
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
3 changed files with 3 additions and 3 deletions

View file

@ -66,7 +66,7 @@
Used by the inspector, set to [code]true[/code] when the property is checked.
</member>
<member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false">
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.
</member>
<member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false">
Used by the inspector, set to [code]true[/code] when the property can add keys for animation.

View file

@ -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");
}

View file

@ -769,7 +769,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("bg_selected", "EditorProperty", style_property_bg);
theme->set_stylebox("bg", "EditorProperty", Ref<StyleBoxEmpty>(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);