@@ -456,8 +456,7 @@ void EditorPropertyArray::update_property() {
456456 property_vbox->set_h_size_flags (SIZE_EXPAND_FILL);
457457 vbox->add_child (property_vbox);
458458
459- button_add_item = EditorInspector::create_inspector_action_button (TTR (" Add Element" ));
460- button_add_item->set_button_icon (get_editor_theme_icon (SNAME (" Add" )));
459+ button_add_item = memnew (EditorInspectorActionButton (TTRC (" Add Element" ), SNAME (" Add" )));
461460 button_add_item->connect (SceneStringName (pressed), callable_mp (this , &EditorPropertyArray::_add_element));
462461 button_add_item->connect (SceneStringName (draw), callable_mp (this , &EditorPropertyArray::_button_add_item_draw));
463462 SET_DRAG_FORWARDING_CD (button_add_item, EditorPropertyArray);
@@ -750,12 +749,6 @@ Node *EditorPropertyArray::get_base_node() {
750749
751750void EditorPropertyArray::_notification (int p_what) {
752751 switch (p_what) {
753- case NOTIFICATION_THEME_CHANGED: {
754- if (button_add_item) {
755- button_add_item->set_button_icon (get_editor_theme_icon (SNAME (" Add" )));
756- }
757- } break ;
758-
759752 case NOTIFICATION_DRAG_BEGIN: {
760753 if (is_visible_in_tree ()) {
761754 if (_is_drop_valid (get_viewport ()->gui_get_drag_data ())) {
@@ -1305,8 +1298,7 @@ void EditorPropertyDictionary::update_property() {
13051298 _create_new_property_slot (EditorPropertyDictionaryObject::NEW_KEY_INDEX);
13061299 _create_new_property_slot (EditorPropertyDictionaryObject::NEW_VALUE_INDEX);
13071300
1308- button_add_item = EditorInspector::create_inspector_action_button (TTR (" Add Key/Value Pair" ));
1309- button_add_item->set_button_icon (get_theme_icon (SNAME (" Add" ), EditorStringName (EditorIcons)));
1301+ button_add_item = memnew (EditorInspectorActionButton (TTRC (" Add Key/Value Pair" ), SNAME (" Add" )));
13101302 button_add_item->set_disabled (is_read_only ());
13111303 button_add_item->set_accessibility_name (TTRC (" Add" ));
13121304 button_add_item->connect (SceneStringName (pressed), callable_mp (this , &EditorPropertyDictionary::_add_key_value));
@@ -1454,7 +1446,6 @@ void EditorPropertyDictionary::_notification(int p_what) {
14541446 switch (p_what) {
14551447 case NOTIFICATION_THEME_CHANGED: {
14561448 if (button_add_item) {
1457- button_add_item->set_button_icon (get_editor_theme_icon (SNAME (" Add" )));
14581449 add_panel->add_theme_style_override (SceneStringName (panel), get_theme_stylebox (SNAME (" DictionaryAddItem" )));
14591450 }
14601451 } break ;
@@ -1661,9 +1652,8 @@ void EditorPropertyLocalizableString::update_property() {
16611652 }
16621653
16631654 if (page_index == max_page) {
1664- button_add_item = EditorInspector::create_inspector_action_button ( TTR ( " Add Translation" ));
1655+ button_add_item = memnew ( EditorInspectorActionButton ( TTRC ( " Add Translation" ), SNAME ( " Add " ) ));
16651656 button_add_item->set_accessibility_name (TTRC (" Add Translation" ));
1666- button_add_item->set_button_icon (get_editor_theme_icon (SNAME (" Add" )));
16671657 button_add_item->connect (SceneStringName (pressed), callable_mp (this , &EditorPropertyLocalizableString::_add_locale_popup));
16681658 property_vbox->add_child (button_add_item);
16691659 }
@@ -1684,16 +1674,6 @@ void EditorPropertyLocalizableString::_object_id_selected(const StringName &p_pr
16841674 emit_signal (SNAME (" object_id_selected" ), p_property, p_id);
16851675}
16861676
1687- void EditorPropertyLocalizableString::_notification (int p_what) {
1688- switch (p_what) {
1689- case NOTIFICATION_THEME_CHANGED: {
1690- if (button_add_item) {
1691- button_add_item->set_button_icon (get_editor_theme_icon (SNAME (" Add" )));
1692- }
1693- } break ;
1694- }
1695- }
1696-
16971677void EditorPropertyLocalizableString::_edit_pressed () {
16981678 Variant prop_val = get_edited_property_value ();
16991679 if (prop_val.get_type () == Variant::NIL && edit->is_pressed ()) {
0 commit comments