From 562c666e3dfc9f0fe72a33974c23373dff77c825 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Wed, 9 Oct 2024 15:21:47 -0700 Subject: Rename internal Button icon to button_icon to match exposed methods --- editor/editor_inspector.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'editor/editor_inspector.cpp') diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 21f67772ea..91dd8e5019 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -2234,7 +2234,7 @@ void EditorInspectorArray::_setup() { if (element_position > 0) { ae.move_up = memnew(Button); - ae.move_up->set_icon(get_editor_theme_icon(SNAME("MoveUp"))); + ae.move_up->set_button_icon(get_editor_theme_icon(SNAME("MoveUp"))); ae.move_up->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_move_element).bind(element_position, element_position - 1)); move_vbox->add_child(ae.move_up); } @@ -2250,7 +2250,7 @@ void EditorInspectorArray::_setup() { if (element_position < count - 1) { ae.move_down = memnew(Button); - ae.move_down->set_icon(get_editor_theme_icon(SNAME("MoveDown"))); + ae.move_down->set_button_icon(get_editor_theme_icon(SNAME("MoveDown"))); ae.move_down->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_move_element).bind(element_position, element_position + 2)); move_vbox->add_child(ae.move_down); } @@ -2273,7 +2273,7 @@ void EditorInspectorArray::_setup() { ae.hbox->add_child(ae.vbox); ae.erase = memnew(Button); - ae.erase->set_icon(get_editor_theme_icon(SNAME("Remove"))); + ae.erase->set_button_icon(get_editor_theme_icon(SNAME("Remove"))); ae.erase->set_v_size_flags(SIZE_SHRINK_CENTER); ae.erase->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorArray::_remove_item).bind(element_position)); ae.hbox->add_child(ae.erase); @@ -2355,10 +2355,10 @@ void EditorInspectorArray::_notification(int p_what) { ae.move_texture_rect->set_texture(get_editor_theme_icon(SNAME("TripleBar"))); } if (ae.move_up) { - ae.move_up->set_icon(get_editor_theme_icon(SNAME("MoveUp"))); + ae.move_up->set_button_icon(get_editor_theme_icon(SNAME("MoveUp"))); } if (ae.move_down) { - ae.move_down->set_icon(get_editor_theme_icon(SNAME("MoveDown"))); + ae.move_down->set_button_icon(get_editor_theme_icon(SNAME("MoveDown"))); } Size2 min_size = get_theme_stylebox(SNAME("Focus"), EditorStringName(EditorStyles))->get_minimum_size(); ae.margin->begin_bulk_theme_override(); @@ -2369,11 +2369,11 @@ void EditorInspectorArray::_notification(int p_what) { ae.margin->end_bulk_theme_override(); if (ae.erase) { - ae.erase->set_icon(get_editor_theme_icon(SNAME("Remove"))); + ae.erase->set_button_icon(get_editor_theme_icon(SNAME("Remove"))); } } - add_button->set_icon(get_editor_theme_icon(SNAME("Add"))); + add_button->set_button_icon(get_editor_theme_icon(SNAME("Add"))); update_minimum_size(); } break; @@ -2542,10 +2542,10 @@ void EditorPaginator::_notification(int p_what) { switch (p_what) { case NOTIFICATION_ENTER_TREE: case NOTIFICATION_THEME_CHANGED: { - first_page_button->set_icon(get_editor_theme_icon(SNAME("PageFirst"))); - prev_page_button->set_icon(get_editor_theme_icon(SNAME("PagePrevious"))); - next_page_button->set_icon(get_editor_theme_icon(SNAME("PageNext"))); - last_page_button->set_icon(get_editor_theme_icon(SNAME("PageLast"))); + first_page_button->set_button_icon(get_editor_theme_icon(SNAME("PageFirst"))); + prev_page_button->set_button_icon(get_editor_theme_icon(SNAME("PagePrevious"))); + next_page_button->set_button_icon(get_editor_theme_icon(SNAME("PageNext"))); + last_page_button->set_button_icon(get_editor_theme_icon(SNAME("PageLast"))); } break; } } @@ -3513,7 +3513,7 @@ void EditorInspector::update_tree() { main_vbox->add_child(spacer); Button *add_md = EditorInspector::create_inspector_action_button(TTR("Add Metadata")); - add_md->set_icon(get_editor_theme_icon(SNAME("Add"))); + add_md->set_button_icon(get_editor_theme_icon(SNAME("Add"))); add_md->connect(SceneStringName(pressed), callable_mp(this, &EditorInspector::_show_add_meta_dialog)); main_vbox->add_child(add_md); if (all_read_only) { -- cgit v1.2.3