5252#include " scene/scene_string_names.h"
5353
5454void BoneTransformEditor::create_editors () {
55- const Color section_color = get_theme_color (SNAME (" prop_subsection" ), SNAME (" Editor" ));
56-
5755 section = memnew (EditorInspectorSection);
58- section->setup (" trf_properties" , label, this , section_color , true );
56+ section->setup (" trf_properties" , label, this , Color ( 0 . 0f , 0 . 0f , 0 . 0f ) , true );
5957 section->unfold ();
6058 add_child (section);
6159
@@ -94,7 +92,7 @@ void BoneTransformEditor::create_editors() {
9492
9593 // Transform/Matrix section.
9694 rest_section = memnew (EditorInspectorSection);
97- rest_section->setup (" trf_properties_transform" , " Rest" , this , section_color , true );
95+ rest_section->setup (" trf_properties_transform" , " Rest" , this , Color ( 0 . 0f , 0 . 0f , 0 . 0f ) , true );
9896 section->get_vbox ()->add_child (rest_section);
9997
10098 // Transform/Matrix property.
@@ -107,8 +105,10 @@ void BoneTransformEditor::create_editors() {
107105
108106void BoneTransformEditor::_notification (int p_what) {
109107 switch (p_what) {
110- case NOTIFICATION_ENTER_TREE : {
111- create_editors ();
108+ case NOTIFICATION_THEME_CHANGED : {
109+ const Color section_color = get_theme_color (SNAME (" prop_subsection" ), SNAME (" Editor" ));
110+ section->set_bg_color (section_color);
111+ rest_section->set_bg_color (section_color);
112112 } break ;
113113 }
114114}
@@ -128,6 +128,7 @@ void BoneTransformEditor::_value_changed(const String &p_property, Variant p_val
128128
129129BoneTransformEditor::BoneTransformEditor (Skeleton3D *p_skeleton) :
130130 skeleton(p_skeleton) {
131+ create_editors ();
131132}
132133
133134void BoneTransformEditor::set_keyable (const bool p_keyable) {
0 commit comments