@@ -1695,6 +1695,10 @@ void EditorInspectorCategory::_bind_methods() {
16951695
16961696void  EditorInspectorCategory::_notification (int  p_what) {
16971697	switch  (p_what) {
1698+ 		case  NOTIFICATION_POSTINITIALIZE: {
1699+ 			connect (SceneStringName (theme_changed), callable_mp (this , &EditorInspectorCategory::_theme_changed));
1700+ 		} break ;
1701+ 
16981702		case  NOTIFICATION_ACCESSIBILITY_UPDATE: {
16991703			RID ae = get_accessibility_element ();
17001704			ERR_FAIL_COND (ae.is_null ());
@@ -1708,13 +1712,6 @@ void EditorInspectorCategory::_notification(int p_what) {
17081712			DisplayServer::get_singleton ()->accessibility_update_add_action (ae, DisplayServer::AccessibilityAction::ACTION_SHOW_CONTEXT_MENU, callable_mp (this , &EditorInspectorCategory::_accessibility_action_menu));
17091713		} break ;
17101714
1711- 		case  NOTIFICATION_THEME_CHANGED: {
1712- 			EditorInspector::initialize_category_theme (theme_cache, this );
1713- 			menu_icon_dirty = true ;
1714- 			_update_icon ();
1715- 			update_minimum_size ();
1716- 		} break ;
1717- 
17181715		case  NOTIFICATION_TRANSLATION_CHANGED: {
17191716			if  (is_favorite) {
17201717				label = TTR (" Favorites"  );
@@ -1897,6 +1894,13 @@ void EditorInspectorCategory::_update_icon() {
18971894	}
18981895}
18991896
1897+ void  EditorInspectorCategory::_theme_changed () {
1898+ 	//  This needs to be done via the signal, as it's fired before the minimum since is updated.
1899+ 	EditorInspector::initialize_category_theme (theme_cache, this );
1900+ 	menu_icon_dirty = true ;
1901+ 	_update_icon ();
1902+ }
1903+ 
19001904void  EditorInspectorCategory::gui_input (const  Ref<InputEvent> &p_event) {
19011905	const  Ref<InputEventMouseButton> &mb = p_event;
19021906	if  (mb.is_valid () && mb->is_pressed () && mb->get_button_index () == MouseButton::RIGHT) {
0 commit comments