summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-10-29 19:25:59 -0500
committerThaddeus Crews <repiteo@outlook.com>2024-10-29 19:25:59 -0500
commit696ca9db3c1aa45a57824783426d595f2d8c03d6 (patch)
tree4869ace538fbc176246f657189b75ebdab94b4a9
parentb748c91e5b6ab2d14f2dff571cc04c723a23962b (diff)
parent562c666e3dfc9f0fe72a33974c23373dff77c825 (diff)
downloadredot-engine-696ca9db3c1aa45a57824783426d595f2d8c03d6.tar.gz
Merge pull request #98039 from aaronfranke/button-icon
Rename internal Button `*_icon` functions to `*_button_icon` to match exposed methods
-rw-r--r--editor/action_map_editor.cpp2
-rw-r--r--editor/animation_track_editor.cpp34
-rw-r--r--editor/code_editor.cpp12
-rw-r--r--editor/connections_dialog.cpp10
-rw-r--r--editor/create_dialog.cpp4
-rw-r--r--editor/debugger/editor_debugger_node.cpp8
-rw-r--r--editor/debugger/editor_profiler.cpp8
-rw-r--r--editor/debugger/editor_visual_profiler.cpp12
-rw-r--r--editor/debugger/script_editor_debugger.cpp20
-rw-r--r--editor/editor_asset_installer.cpp8
-rw-r--r--editor/editor_audio_buses.cpp8
-rw-r--r--editor/editor_autoload_settings.cpp6
-rw-r--r--editor/editor_dock_manager.cpp14
-rw-r--r--editor/editor_help.cpp8
-rw-r--r--editor/editor_help_search.cpp4
-rw-r--r--editor/editor_inspector.cpp24
-rw-r--r--editor/editor_log.cpp22
-rw-r--r--editor/editor_main_screen.cpp6
-rw-r--r--editor/editor_node.cpp6
-rw-r--r--editor/editor_properties.cpp36
-rw-r--r--editor/editor_properties_array_dict.cpp24
-rw-r--r--editor/editor_resource_picker.cpp8
-rw-r--r--editor/editor_run_native.cpp2
-rw-r--r--editor/editor_settings_dialog.cpp2
-rw-r--r--editor/export/export_template_manager.cpp2
-rw-r--r--editor/export/project_export.cpp12
-rw-r--r--editor/fbx_importer_manager.cpp2
-rw-r--r--editor/filesystem_dock.cpp30
-rw-r--r--editor/group_settings_editor.cpp2
-rw-r--r--editor/groups_editor.cpp2
-rw-r--r--editor/gui/editor_bottom_panel.cpp2
-rw-r--r--editor/gui/editor_file_dialog.cpp28
-rw-r--r--editor/gui/editor_quick_open_dialog.cpp8
-rw-r--r--editor/gui/editor_run_bar.cpp14
-rw-r--r--editor/gui/editor_scene_tabs.cpp2
-rw-r--r--editor/gui/editor_toaster.cpp14
-rw-r--r--editor/gui/editor_zoom_widget.cpp4
-rw-r--r--editor/import/3d/scene_import_settings.cpp28
-rw-r--r--editor/import/audio_stream_import_settings.cpp18
-rw-r--r--editor/import/dynamic_font_import_settings.cpp2
-rw-r--r--editor/inspector_dock.cpp30
-rw-r--r--editor/node_dock.cpp4
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp6
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp12
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp16
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp10
-rw-r--r--editor/plugins/animation_library_editor.cpp4
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp36
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp10
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp6
-rw-r--r--editor/plugins/audio_stream_editor_plugin.cpp12
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp50
-rw-r--r--editor/plugins/control_editor_plugin.cpp54
-rw-r--r--editor/plugins/curve_editor_plugin.cpp2
-rw-r--r--editor/plugins/font_config_plugin.cpp10
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp2
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp4
-rw-r--r--editor/plugins/gradient_texture_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/input_event_editor_plugin.cpp2
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.cpp2
-rw-r--r--editor/plugins/material_editor_plugin.cpp8
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp2
-rw-r--r--editor/plugins/navigation_obstacle_3d_editor_plugin.cpp4
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp4
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp36
-rw-r--r--editor/plugins/occluder_instance_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/packed_scene_editor_plugin.cpp2
-rw-r--r--editor/plugins/parallax_background_editor_plugin.cpp2
-rw-r--r--editor/plugins/particle_process_material_editor_plugin.cpp2
-rw-r--r--editor/plugins/particles_editor_plugin.cpp2
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp16
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp16
-rw-r--r--editor/plugins/physical_bone_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp32
-rw-r--r--editor/plugins/polygon_3d_editor_plugin.cpp4
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp2
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp6
-rw-r--r--editor/plugins/script_editor_plugin.cpp14
-rw-r--r--editor/plugins/shader_file_editor_plugin.cpp4
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp16
-rw-r--r--editor/plugins/skeleton_ik_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp58
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp8
-rw-r--r--editor/plugins/theme_editor_plugin.cpp88
-rw-r--r--editor/plugins/theme_editor_preview.cpp4
-rw-r--r--editor/plugins/tiles/tile_atlas_view.cpp2
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp20
-rw-r--r--editor/plugins/tiles/tile_map_layer_editor.cpp54
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp12
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp8
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp4
-rw-r--r--editor/plugins/tool_button_editor_plugin.cpp2
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp20
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp10
-rw-r--r--editor/plugins/voxel_gi_editor_plugin.cpp2
-rw-r--r--editor/project_manager.cpp36
-rw-r--r--editor/project_manager/project_dialog.cpp6
-rw-r--r--editor/project_manager/project_list.cpp8
-rw-r--r--editor/project_manager/project_tag.cpp2
-rw-r--r--editor/project_settings_editor.cpp6
-rw-r--r--editor/scene_create_dialog.cpp12
-rw-r--r--editor/scene_tree_dock.cpp36
-rw-r--r--editor/script_create_dialog.cpp6
-rw-r--r--editor/shader_create_dialog.cpp2
-rw-r--r--editor/shader_globals_editor.cpp2
-rw-r--r--editor/window_wrapper.cpp2
-rw-r--r--modules/csg/editor/csg_gizmos.cpp2
-rw-r--r--modules/gltf/editor/editor_scene_importer_blend.cpp2
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp6
-rw-r--r--modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp2
-rw-r--r--modules/multiplayer/editor/editor_network_profiler.cpp10
-rw-r--r--modules/multiplayer/editor/replication_editor.cpp4
-rw-r--r--modules/navigation/editor/navigation_mesh_editor_plugin.cpp4
-rw-r--r--modules/openxr/editor/openxr_action_editor.cpp2
-rw-r--r--modules/openxr/editor/openxr_action_set_editor.cpp8
-rw-r--r--modules/openxr/editor/openxr_interaction_profile_editor.cpp4
-rw-r--r--scene/gui/button.cpp8
-rw-r--r--scene/gui/button.h4
-rw-r--r--scene/gui/color_picker.cpp16
-rw-r--r--scene/gui/file_dialog.cpp18
-rw-r--r--scene/gui/graph_edit.cpp16
-rw-r--r--scene/gui/option_button.cpp6
129 files changed, 726 insertions, 726 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 0d89f37dd2..cf5b18ce3c 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -358,7 +358,7 @@ void ActionMapEditor::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
action_list_search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- add_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ add_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
if (!actions_cache.is_empty()) {
update_action_list();
}
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 741d127ea2..77d21cb7b0 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -1440,8 +1440,8 @@ void AnimationTimelineEdit::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- add_track->set_icon(get_editor_theme_icon(SNAME("Add")));
- loop->set_icon(get_editor_theme_icon(SNAME("Loop")));
+ add_track->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ loop->set_button_icon(get_editor_theme_icon(SNAME("Loop")));
time_icon->set_texture(get_editor_theme_icon(SNAME("Time")));
add_track->get_popup()->clear();
@@ -1818,15 +1818,15 @@ void AnimationTimelineEdit::update_values() {
switch (animation->get_loop_mode()) {
case Animation::LOOP_NONE: {
- loop->set_icon(get_editor_theme_icon(SNAME("Loop")));
+ loop->set_button_icon(get_editor_theme_icon(SNAME("Loop")));
loop->set_pressed(false);
} break;
case Animation::LOOP_LINEAR: {
- loop->set_icon(get_editor_theme_icon(SNAME("Loop")));
+ loop->set_button_icon(get_editor_theme_icon(SNAME("Loop")));
loop->set_pressed(true);
} break;
case Animation::LOOP_PINGPONG: {
- loop->set_icon(get_editor_theme_icon(SNAME("PingPongLoop")));
+ loop->set_button_icon(get_editor_theme_icon(SNAME("PingPongLoop")));
loop->set_pressed(true);
} break;
default:
@@ -3313,7 +3313,7 @@ Variant AnimationTrackEdit::get_drag_data(const Point2 &p_point) {
Button *tb = memnew(Button);
tb->set_flat(true);
tb->set_text(path_cache);
- tb->set_icon(icon_cache);
+ tb->set_button_icon(icon_cache);
tb->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
tb->add_theme_constant_override("icon_max_width", get_theme_constant("class_icon_size", EditorStringName(Editor)));
set_drag_preview(tb);
@@ -5112,18 +5112,18 @@ void AnimationTrackEditor::_notification(int p_what) {
}
case NOTIFICATION_THEME_CHANGED: {
zoom_icon->set_texture(get_editor_theme_icon(SNAME("Zoom")));
- bezier_edit_icon->set_icon(get_editor_theme_icon(SNAME("EditBezier")));
- snap_timeline->set_icon(get_editor_theme_icon(SNAME("SnapTimeline")));
- snap_keys->set_icon(get_editor_theme_icon(SNAME("SnapKeys")));
- view_group->set_icon(get_editor_theme_icon(view_group->is_pressed() ? SNAME("AnimationTrackList") : SNAME("AnimationTrackGroup")));
- selected_filter->set_icon(get_editor_theme_icon(SNAME("AnimationFilter")));
- imported_anim_warning->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
- dummy_player_warning->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
- inactive_player_warning->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ bezier_edit_icon->set_button_icon(get_editor_theme_icon(SNAME("EditBezier")));
+ snap_timeline->set_button_icon(get_editor_theme_icon(SNAME("SnapTimeline")));
+ snap_keys->set_button_icon(get_editor_theme_icon(SNAME("SnapKeys")));
+ view_group->set_button_icon(get_editor_theme_icon(view_group->is_pressed() ? SNAME("AnimationTrackList") : SNAME("AnimationTrackGroup")));
+ selected_filter->set_button_icon(get_editor_theme_icon(SNAME("AnimationFilter")));
+ imported_anim_warning->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ dummy_player_warning->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ inactive_player_warning->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
main_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
edit->get_popup()->set_item_icon(edit->get_popup()->get_item_index(EDIT_APPLY_RESET), get_editor_theme_icon(SNAME("Reload")));
- auto_fit->set_icon(get_editor_theme_icon(SNAME("AnimationAutoFit")));
- auto_fit_bezier->set_icon(get_editor_theme_icon(SNAME("AnimationAutoFitBezier")));
+ auto_fit->set_button_icon(get_editor_theme_icon(SNAME("AnimationAutoFit")));
+ auto_fit_bezier->set_button_icon(get_editor_theme_icon(SNAME("AnimationAutoFitBezier")));
const int timeline_separation = get_theme_constant(SNAME("timeline_v_separation"), SNAME("AnimationTrackEditor"));
timeline_vbox->add_theme_constant_override("separation", timeline_separation);
@@ -7279,7 +7279,7 @@ void AnimationTrackEditor::_cleanup_animation(Ref<Animation> p_animation) {
void AnimationTrackEditor::_view_group_toggle() {
_update_tracks();
- view_group->set_icon(get_editor_theme_icon(view_group->is_pressed() ? SNAME("AnimationTrackList") : SNAME("AnimationTrackGroup")));
+ view_group->set_button_icon(get_editor_theme_icon(view_group->is_pressed() ? SNAME("AnimationTrackList") : SNAME("AnimationTrackGroup")));
bezier_edit->set_filtered(selected_filter->is_pressed());
}
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 88a32b1a6d..05eeef4fc9 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -104,8 +104,8 @@ void FindReplaceBar::_notification(int p_what) {
[[fallthrough]];
}
case NOTIFICATION_READY: {
- find_prev->set_icon(get_editor_theme_icon(SNAME("MoveUp")));
- find_next->set_icon(get_editor_theme_icon(SNAME("MoveDown")));
+ find_prev->set_button_icon(get_editor_theme_icon(SNAME("MoveUp")));
+ find_next->set_button_icon(get_editor_theme_icon(SNAME("MoveDown")));
hide_button->set_texture_normal(get_editor_theme_icon(SNAME("Close")));
hide_button->set_texture_hover(get_editor_theme_icon(SNAME("Close")));
hide_button->set_texture_pressed(get_editor_theme_icon(SNAME("Close")));
@@ -549,7 +549,7 @@ void FindReplaceBar::_update_toggle_replace_button(bool p_replace_visible) {
String shortcut = ED_GET_SHORTCUT(p_replace_visible ? "script_text_editor/find" : "script_text_editor/replace")->get_as_text();
toggle_replace_button->set_tooltip_text(vformat("%s (%s)", tooltip, shortcut));
StringName rtl_compliant_arrow = is_layout_rtl() ? SNAME("GuiTreeArrowLeft") : SNAME("GuiTreeArrowRight");
- toggle_replace_button->set_icon(get_editor_theme_icon(p_replace_visible ? SNAME("GuiTreeArrowDown") : rtl_compliant_arrow));
+ toggle_replace_button->set_button_icon(get_editor_theme_icon(p_replace_visible ? SNAME("GuiTreeArrowDown") : rtl_compliant_arrow));
}
void FindReplaceBar::_show_search(bool p_with_replace, bool p_show_only) {
@@ -1493,8 +1493,8 @@ void CodeTextEditor::goto_error() {
void CodeTextEditor::_update_text_editor_theme() {
emit_signal(SNAME("load_theme_settings"));
- error_button->set_icon(get_editor_theme_icon(SNAME("StatusError")));
- warning_button->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ error_button->set_button_icon(get_editor_theme_icon(SNAME("StatusError")));
+ warning_button->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
Ref<Font> status_bar_font = get_theme_font(SNAME("status_source"), EditorStringName(EditorFonts));
int status_bar_font_size = get_theme_font_size(SNAME("status_source_size"), EditorStringName(EditorFonts));
@@ -1771,7 +1771,7 @@ void CodeTextEditor::show_toggle_scripts_button() {
void CodeTextEditor::update_toggle_scripts_button() {
ERR_FAIL_NULL(toggle_scripts_list);
bool forward = toggle_scripts_list->is_visible() == is_layout_rtl();
- toggle_scripts_button->set_icon(get_editor_theme_icon(forward ? SNAME("Forward") : SNAME("Back")));
+ toggle_scripts_button->set_button_icon(get_editor_theme_icon(forward ? SNAME("Forward") : SNAME("Back")));
toggle_scripts_button->set_tooltip_text(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text()));
}
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 1c269a62c5..b114977c3b 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -488,7 +488,7 @@ void ConnectDialog::_notification(int p_what) {
}
method_search->set_right_icon(get_editor_theme_icon("Search"));
- open_method_tree->set_icon(get_editor_theme_icon("Edit"));
+ open_method_tree->set_button_icon(get_editor_theme_icon("Edit"));
} break;
}
}
@@ -1079,17 +1079,17 @@ void ConnectionsDock::_tree_item_selected() {
TreeItem *item = tree->get_selected();
if (item && _get_item_type(*item) == TREE_ITEM_TYPE_SIGNAL) {
connect_button->set_text(TTR("Connect..."));
- connect_button->set_icon(get_editor_theme_icon(SNAME("Instance")));
+ connect_button->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
connect_button->set_disabled(false);
} else if (item && _get_item_type(*item) == TREE_ITEM_TYPE_CONNECTION) {
connect_button->set_text(TTR("Disconnect"));
- connect_button->set_icon(get_editor_theme_icon(SNAME("Unlinked")));
+ connect_button->set_button_icon(get_editor_theme_icon(SNAME("Unlinked")));
Object::Connection connection = item->get_metadata(0);
connect_button->set_disabled(_is_connection_inherited(connection));
} else {
connect_button->set_text(TTR("Connect..."));
- connect_button->set_icon(get_editor_theme_icon(SNAME("Instance")));
+ connect_button->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
connect_button->set_disabled(true);
}
}
@@ -1586,7 +1586,7 @@ void ConnectionsDock::update_tree() {
}
connect_button->set_text(TTR("Connect..."));
- connect_button->set_icon(get_editor_theme_icon(SNAME("Instance")));
+ connect_button->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
connect_button->set_disabled(true);
}
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 330ac3b437..78dc772d9e 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -468,7 +468,7 @@ void CreateDialog::_notification(int p_what) {
recent->set_fixed_icon_size(Size2(icon_width, icon_width));
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- favorite->set_icon(get_editor_theme_icon(SNAME("Favorites")));
+ favorite->set_button_icon(get_editor_theme_icon(SNAME("Favorites")));
} break;
}
}
@@ -613,7 +613,7 @@ Variant CreateDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) {
Button *tb = memnew(Button);
tb->set_flat(true);
- tb->set_icon(ti->get_icon(0));
+ tb->set_button_icon(ti->get_icon(0));
tb->set_text(ti->get_text(0));
tb->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
favorites->set_drag_preview(tb);
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index b4265f9fc0..ee8aae661b 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -417,18 +417,18 @@ void EditorDebuggerNode::_update_errors() {
if (error_count == 0 && warning_count == 0) {
debugger_button->set_text(TTR("Debugger"));
debugger_button->remove_theme_color_override(SceneStringName(font_color));
- debugger_button->set_icon(Ref<Texture2D>());
+ debugger_button->set_button_icon(Ref<Texture2D>());
} else {
debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")");
if (error_count >= 1 && warning_count >= 1) {
- debugger_button->set_icon(get_editor_theme_icon(SNAME("ErrorWarning")));
+ debugger_button->set_button_icon(get_editor_theme_icon(SNAME("ErrorWarning")));
// Use error color to represent the highest level of severity reported.
debugger_button->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
} else if (error_count >= 1) {
- debugger_button->set_icon(get_editor_theme_icon(SNAME("Error")));
+ debugger_button->set_button_icon(get_editor_theme_icon(SNAME("Error")));
debugger_button->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
} else {
- debugger_button->set_icon(get_editor_theme_icon(SNAME("Warning")));
+ debugger_button->set_button_icon(get_editor_theme_icon(SNAME("Warning")));
debugger_button->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
}
}
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index 8b253f36e4..33fa208f70 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -390,10 +390,10 @@ void EditorProfiler::_update_frame() {
void EditorProfiler::_update_button_text() {
if (activate->is_pressed()) {
- activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
activate->set_text(TTR("Stop"));
} else {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
activate->set_text(TTR("Start"));
}
}
@@ -428,8 +428,8 @@ void EditorProfiler::_notification(int p_what) {
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED: {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
- clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
+ clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
theme_cache.seek_line_color = get_theme_color(SceneStringName(font_color), EditorStringName(Editor));
theme_cache.seek_line_color.a = 0.8;
diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp
index b949df4518..9a83277e99 100644
--- a/editor/debugger/editor_visual_profiler.cpp
+++ b/editor/debugger/editor_visual_profiler.cpp
@@ -411,12 +411,12 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) {
void EditorVisualProfiler::_activate_pressed() {
if (activate->is_pressed()) {
- activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
activate->set_text(TTR("Stop"));
_clear_pressed(); //always clear on start
clear_button->set_disabled(false);
} else {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
activate->set_text(TTR("Start"));
}
emit_signal(SNAME("enable_profiling"), activate->is_pressed());
@@ -438,8 +438,8 @@ void EditorVisualProfiler::_notification(int p_what) {
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED: {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
- clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
+ clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
} break;
}
}
@@ -657,10 +657,10 @@ void EditorVisualProfiler::_bind_methods() {
void EditorVisualProfiler::_update_button_text() {
if (activate->is_pressed()) {
- activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
activate->set_text(TTR("Stop"));
} else {
- activate->set_icon(get_editor_theme_icon(SNAME("Play")));
+ activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
activate->set_text(TTR("Start"));
}
}
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 73c59707d2..c42740de50 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -95,9 +95,9 @@ void ScriptEditorDebugger::debug_copy() {
void ScriptEditorDebugger::debug_skip_breakpoints() {
skip_breakpoints_value = !skip_breakpoints_value;
if (skip_breakpoints_value) {
- skip_breakpoints->set_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOn")));
+ skip_breakpoints->set_button_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOn")));
} else {
- skip_breakpoints->set_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOff")));
+ skip_breakpoints->set_button_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOff")));
}
Array msg;
@@ -870,14 +870,14 @@ void ScriptEditorDebugger::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
tabs->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
- skip_breakpoints->set_icon(get_editor_theme_icon(skip_breakpoints_value ? SNAME("DebugSkipBreakpointsOn") : SNAME("DebugSkipBreakpointsOff")));
- copy->set_icon(get_editor_theme_icon(SNAME("ActionCopy")));
- step->set_icon(get_editor_theme_icon(SNAME("DebugStep")));
- next->set_icon(get_editor_theme_icon(SNAME("DebugNext")));
- dobreak->set_icon(get_editor_theme_icon(SNAME("Pause")));
- docontinue->set_icon(get_editor_theme_icon(SNAME("DebugContinue")));
- vmem_refresh->set_icon(get_editor_theme_icon(SNAME("Reload")));
- vmem_export->set_icon(get_editor_theme_icon(SNAME("Save")));
+ skip_breakpoints->set_button_icon(get_editor_theme_icon(skip_breakpoints_value ? SNAME("DebugSkipBreakpointsOn") : SNAME("DebugSkipBreakpointsOff")));
+ copy->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
+ step->set_button_icon(get_editor_theme_icon(SNAME("DebugStep")));
+ next->set_button_icon(get_editor_theme_icon(SNAME("DebugNext")));
+ dobreak->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
+ docontinue->set_button_icon(get_editor_theme_icon(SNAME("DebugContinue")));
+ vmem_refresh->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
+ vmem_export->set_button_icon(get_editor_theme_icon(SNAME("Save")));
search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
reason->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 1e44a9bdc9..bce0c87452 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -411,9 +411,9 @@ void EditorAssetInstaller::_toggle_source_tree(bool p_visible, bool p_scroll_to_
show_source_files_button->set_pressed_no_signal(p_visible); // To keep in sync if triggered by something else.
if (p_visible) {
- show_source_files_button->set_icon(get_editor_theme_icon(SNAME("Back")));
+ show_source_files_button->set_button_icon(get_editor_theme_icon(SNAME("Back")));
} else {
- show_source_files_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
+ show_source_files_button->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
}
if (p_visible && p_scroll_to_error && first_file_conflict) {
@@ -597,9 +597,9 @@ void EditorAssetInstaller::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
if (show_source_files_button->is_pressed()) {
- show_source_files_button->set_icon(get_editor_theme_icon(SNAME("Back")));
+ show_source_files_button->set_button_icon(get_editor_theme_icon(SNAME("Back")));
} else {
- show_source_files_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
+ show_source_files_button->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
}
asset_conflicts_link->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 24fc7a9c2b..084ecf7229 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -96,14 +96,14 @@ void EditorAudioBus::_notification(int p_what) {
Ref<StyleBoxFlat>(mute->get_theme_stylebox(SceneStringName(pressed)))->set_border_color(mute_color.darkened(darkening_factor));
Ref<StyleBoxFlat>(bypass->get_theme_stylebox(SceneStringName(pressed)))->set_border_color(bypass_color.darkened(darkening_factor));
- solo->set_icon(get_editor_theme_icon(SNAME("AudioBusSolo")));
+ solo->set_button_icon(get_editor_theme_icon(SNAME("AudioBusSolo")));
solo->add_theme_color_override("icon_pressed_color", solo_color);
- mute->set_icon(get_editor_theme_icon(SNAME("AudioBusMute")));
+ mute->set_button_icon(get_editor_theme_icon(SNAME("AudioBusMute")));
mute->add_theme_color_override("icon_pressed_color", mute_color);
- bypass->set_icon(get_editor_theme_icon(SNAME("AudioBusBypass")));
+ bypass->set_button_icon(get_editor_theme_icon(SNAME("AudioBusBypass")));
bypass->add_theme_color_override("icon_pressed_color", bypass_color);
- bus_options->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ bus_options->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
audio_value_preview_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SceneStringName(font_color), SNAME("TooltipLabel")));
audio_value_preview_label->add_theme_color_override("font_shadow_color", get_theme_color(SNAME("font_shadow_color"), SNAME("TooltipLabel")));
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 1613d1d62f..23a2f5b13c 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -55,12 +55,12 @@ void EditorAutoloadSettings::_notification(int p_what) {
file_dialog->add_filter("*." + E);
}
- browse_button->set_icon(get_editor_theme_icon(SNAME("Folder")));
+ browse_button->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
} break;
case NOTIFICATION_THEME_CHANGED: {
- browse_button->set_icon(get_editor_theme_icon(SNAME("Folder")));
- add_autoload->set_icon(get_editor_theme_icon(SNAME("Add")));
+ browse_button->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
+ add_autoload->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
diff --git a/editor/editor_dock_manager.cpp b/editor/editor_dock_manager.cpp
index 0bdda41f26..1db073ec81 100644
--- a/editor/editor_dock_manager.cpp
+++ b/editor/editor_dock_manager.cpp
@@ -852,21 +852,21 @@ void DockContextPopup::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
if (make_float_button) {
- make_float_button->set_icon(get_editor_theme_icon(SNAME("MakeFloating")));
+ make_float_button->set_button_icon(get_editor_theme_icon(SNAME("MakeFloating")));
}
if (is_layout_rtl()) {
- tab_move_left_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
- tab_move_right_button->set_icon(get_editor_theme_icon(SNAME("Back")));
+ tab_move_left_button->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
+ tab_move_right_button->set_button_icon(get_editor_theme_icon(SNAME("Back")));
tab_move_left_button->set_tooltip_text(TTR("Move this dock right one tab."));
tab_move_right_button->set_tooltip_text(TTR("Move this dock left one tab."));
} else {
- tab_move_left_button->set_icon(get_editor_theme_icon(SNAME("Back")));
- tab_move_right_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
+ tab_move_left_button->set_button_icon(get_editor_theme_icon(SNAME("Back")));
+ tab_move_right_button->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
tab_move_left_button->set_tooltip_text(TTR("Move this dock left one tab."));
tab_move_right_button->set_tooltip_text(TTR("Move this dock right one tab."));
}
- dock_to_bottom_button->set_icon(get_editor_theme_icon(SNAME("ControlAlignBottomWide")));
- close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
+ dock_to_bottom_button->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignBottomWide")));
+ close_button->set_button_icon(get_editor_theme_icon(SNAME("Close")));
} break;
}
}
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index cfe257fcfc..0ca1ed2d50 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -3109,9 +3109,9 @@ void EditorHelp::set_scroll(int p_scroll) {
void EditorHelp::update_toggle_scripts_button() {
if (is_layout_rtl()) {
- toggle_scripts_button->set_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back")));
+ toggle_scripts_button->set_button_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Forward") : SNAME("Back")));
} else {
- toggle_scripts_button->set_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward")));
+ toggle_scripts_button->set_button_icon(get_editor_theme_icon(ScriptEditor::get_singleton()->is_scripts_panel_toggled() ? SNAME("Back") : SNAME("Forward")));
}
toggle_scripts_button->set_tooltip_text(vformat("%s (%s)", TTR("Toggle Scripts Panel"), ED_GET_SHORTCUT("script_editor/toggle_scripts_panel")->get_as_text()));
}
@@ -4153,8 +4153,8 @@ void FindBar::popup_search() {
void FindBar::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- find_prev->set_icon(get_editor_theme_icon(SNAME("MoveUp")));
- find_next->set_icon(get_editor_theme_icon(SNAME("MoveDown")));
+ find_prev->set_button_icon(get_editor_theme_icon(SNAME("MoveUp")));
+ find_next->set_button_icon(get_editor_theme_icon(SNAME("MoveDown")));
hide_button->set_texture_normal(get_editor_theme_icon(SNAME("Close")));
hide_button->set_texture_hover(get_editor_theme_icon(SNAME("Close")));
hide_button->set_texture_pressed(get_editor_theme_icon(SNAME("Close")));
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 47f16f219f..d11bf7720c 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -244,8 +244,8 @@ void EditorHelpSearch::_notification(int p_what) {
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
search_box->add_theme_icon_override("right_icon", get_editor_theme_icon(SNAME("Search")));
- case_sensitive_button->set_icon(get_editor_theme_icon(SNAME("MatchCase")));
- hierarchy_button->set_icon(get_editor_theme_icon(SNAME("ClassList")));
+ case_sensitive_button->set_button_icon(get_editor_theme_icon(SNAME("MatchCase")));
+ hierarchy_button->set_button_icon(get_editor_theme_icon(SNAME("ClassList")));
if (is_visible()) {
_update_results();
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) {
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index aec374929e..db26a75cb8 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -100,20 +100,20 @@ void EditorLog::_update_theme() {
log->add_theme_font_size_override("mono_font_size", font_size);
log->end_bulk_theme_override();
- type_filter_map[MSG_TYPE_STD]->toggle_button->set_icon(get_editor_theme_icon(SNAME("Popup")));
- type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_icon(get_editor_theme_icon(SNAME("StatusError")));
- type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_icon(get_editor_theme_icon(SNAME("StatusWarning")));
- type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ type_filter_map[MSG_TYPE_STD]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("Popup")));
+ type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("StatusError")));
+ type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("StatusWarning")));
+ type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
type_filter_map[MSG_TYPE_STD]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_theme_type_variation("EditorLogFilterButton");
- clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
- copy_button->set_icon(get_editor_theme_icon(SNAME("ActionCopy")));
- collapse_button->set_icon(get_editor_theme_icon(SNAME("CombineLines")));
- show_search_button->set_icon(get_editor_theme_icon(SNAME("Search")));
+ clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
+ copy_button->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
+ collapse_button->set_button_icon(get_editor_theme_icon(SNAME("CombineLines")));
+ show_search_button->set_button_icon(get_editor_theme_icon(SNAME("Search")));
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
theme_cache.error_color = get_theme_color(SNAME("error_color"), EditorStringName(Editor));
@@ -204,7 +204,7 @@ void EditorLog::_clear_request() {
log->clear();
messages.clear();
_reset_message_counts();
- tool_button->set_icon(Ref<Texture2D>());
+ tool_button->set_button_icon(Ref<Texture2D>());
}
void EditorLog::_copy_request() {
@@ -359,14 +359,14 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
Ref<Texture2D> icon = theme_cache.error_icon;
log->add_image(icon);
log->add_text(" ");
- tool_button->set_icon(icon);
+ tool_button->set_button_icon(icon);
} break;
case MSG_TYPE_WARNING: {
log->push_color(theme_cache.warning_color);
Ref<Texture2D> icon = theme_cache.warning_icon;
log->add_image(icon);
log->add_text(" ");
- tool_button->set_icon(icon);
+ tool_button->set_button_icon(icon);
} break;
case MSG_TYPE_EDITOR: {
// Distinguish editor messages from messages printed by the project
diff --git a/editor/editor_main_screen.cpp b/editor/editor_main_screen.cpp
index 77bbee5a7f..6da2bce60e 100644
--- a/editor/editor_main_screen.cpp
+++ b/editor/editor_main_screen.cpp
@@ -66,9 +66,9 @@ void EditorMainScreen::_notification(int p_what) {
Ref<Texture2D> icon = p_editor->get_icon();
if (icon.is_valid()) {
- tb->set_icon(icon);
+ tb->set_button_icon(icon);
} else if (has_theme_icon(p_editor->get_name(), EditorStringName(EditorIcons))) {
- tb->set_icon(get_theme_icon(p_editor->get_name(), EditorStringName(EditorIcons)));
+ tb->set_button_icon(get_theme_icon(p_editor->get_name(), EditorStringName(EditorIcons)));
}
}
} break;
@@ -244,7 +244,7 @@ void EditorMainScreen::add_main_plugin(EditorPlugin *p_editor) {
icon = get_editor_theme_icon(p_editor->get_name());
}
if (icon.is_valid()) {
- tb->set_icon(icon);
+ tb->set_button_icon(icon);
// Make sure the control is updated if the icon is reimported.
icon->connect_changed(callable_mp((Control *)tb, &Control::update_minimum_size));
}
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index c69f443a22..161e518fc6 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -532,7 +532,7 @@ void EditorNode::_update_theme(bool p_skip_creation) {
editor_main_screen->add_theme_style_override(SceneStringName(panel), theme->get_stylebox(SNAME("Content"), EditorStringName(EditorStyles)));
bottom_panel->add_theme_style_override(SceneStringName(panel), theme->get_stylebox(SNAME("BottomPanel"), EditorStringName(EditorStyles)));
- distraction_free->set_icon(theme->get_icon(SNAME("DistractionFree"), EditorStringName(EditorIcons)));
+ distraction_free->set_button_icon(theme->get_icon(SNAME("DistractionFree"), EditorStringName(EditorIcons)));
distraction_free->add_theme_style_override(SceneStringName(pressed), theme->get_stylebox(CoreStringName(normal), "FlatMenuButton"));
help_menu->set_item_icon(help_menu->get_item_index(HELP_SEARCH), theme->get_icon(SNAME("HelpSearch"), EditorStringName(EditorIcons)));
@@ -621,7 +621,7 @@ void EditorNode::_notification(int p_what) {
// Update the icon itself only when the spinner is visible.
if (_should_display_update_spinner()) {
- update_spinner->set_icon(theme->get_icon("Progress" + itos(update_spinner_step + 1), EditorStringName(EditorIcons)));
+ update_spinner->set_button_icon(theme->get_icon("Progress" + itos(update_spinner_step + 1), EditorStringName(EditorIcons)));
}
}
@@ -7497,7 +7497,7 @@ EditorNode::EditorNode() {
update_spinner = memnew(MenuButton);
right_menu_hb->add_child(update_spinner);
- update_spinner->set_icon(theme->get_icon(SNAME("Progress1"), EditorStringName(EditorIcons)));
+ update_spinner->set_button_icon(theme->get_icon(SNAME("Progress1"), EditorStringName(EditorIcons)));
update_spinner->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
PopupMenu *p = update_spinner->get_popup();
p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index ccb6e21c3e..ce75efa462 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -192,7 +192,7 @@ void EditorPropertyMultilineText::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
Ref<Texture2D> df = get_editor_theme_icon(SNAME("DistractionFree"));
- open_big_text->set_icon(df);
+ open_big_text->set_button_icon(df);
Ref<Font> font;
int font_size;
@@ -340,9 +340,9 @@ void EditorPropertyTextEnum::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- edit_button->set_icon(get_editor_theme_icon(SNAME("Edit")));
- accept_button->set_icon(get_editor_theme_icon(SNAME("ImportCheck")));
- cancel_button->set_icon(get_editor_theme_icon(SNAME("ImportFail")));
+ edit_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ accept_button->set_button_icon(get_editor_theme_icon(SNAME("ImportCheck")));
+ cancel_button->set_button_icon(get_editor_theme_icon(SNAME("ImportFail")));
} break;
}
}
@@ -428,7 +428,7 @@ void EditorPropertyLocale::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- locale_edit->set_icon(get_editor_theme_icon(SNAME("Translation")));
+ locale_edit->set_button_icon(get_editor_theme_icon(SNAME("Translation")));
} break;
}
}
@@ -522,9 +522,9 @@ void EditorPropertyPath::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
if (folder) {
- path_edit->set_icon(get_editor_theme_icon(SNAME("FolderBrowse")));
+ path_edit->set_button_icon(get_editor_theme_icon(SNAME("FolderBrowse")));
} else {
- path_edit->set_icon(get_editor_theme_icon(SNAME("FileBrowse")));
+ path_edit->set_button_icon(get_editor_theme_icon(SNAME("FileBrowse")));
}
} break;
}
@@ -1343,12 +1343,12 @@ void EditorPropertyObjectID::update_property() {
edit->set_text(type + " ID: " + uitos(id));
edit->set_tooltip_text(type + " ID: " + uitos(id));
edit->set_disabled(false);
- edit->set_icon(EditorNode::get_singleton()->get_class_icon(type));
+ edit->set_button_icon(EditorNode::get_singleton()->get_class_icon(type));
} else {
edit->set_text(TTR("<empty>"));
edit->set_tooltip_text("");
edit->set_disabled(true);
- edit->set_icon(Ref<Texture2D>());
+ edit->set_button_icon(Ref<Texture2D>());
}
}
@@ -1378,7 +1378,7 @@ void EditorPropertySignal::update_property() {
edit->set_text("Signal: " + signal.get_name());
edit->set_disabled(false);
- edit->set_icon(get_editor_theme_icon(SNAME("Signals")));
+ edit->set_button_icon(get_editor_theme_icon(SNAME("Signals")));
}
EditorPropertySignal::EditorPropertySignal() {
@@ -1397,7 +1397,7 @@ void EditorPropertyCallable::update_property() {
edit->set_text("Callable");
edit->set_disabled(true);
- edit->set_icon(get_editor_theme_icon(SNAME("Callable")));
+ edit->set_button_icon(get_editor_theme_icon(SNAME("Callable")));
}
EditorPropertyCallable::EditorPropertyCallable() {
@@ -2024,9 +2024,9 @@ void EditorPropertyQuaternion::_notification(int p_what) {
for (int i = 0; i < 3; i++) {
euler[i]->add_theme_color_override("label_color", colors[i]);
}
- edit_button->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ edit_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
euler_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("property_color"), SNAME("EditorProperty")));
- warning->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ warning->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
warning->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
} break;
}
@@ -2829,7 +2829,7 @@ void EditorPropertyNodePath::update_property() {
assign->set_tooltip_text(p);
if (p.is_empty()) {
- assign->set_icon(Ref<Texture2D>());
+ assign->set_button_icon(Ref<Texture2D>());
assign->set_text(TTR("Assign..."));
assign->set_flat(false);
return;
@@ -2837,7 +2837,7 @@ void EditorPropertyNodePath::update_property() {
assign->set_flat(true);
if (!base_node || !base_node->has_node(p)) {
- assign->set_icon(Ref<Texture2D>());
+ assign->set_button_icon(Ref<Texture2D>());
assign->set_text(p);
return;
}
@@ -2846,13 +2846,13 @@ void EditorPropertyNodePath::update_property() {
ERR_FAIL_NULL(target_node);
if (String(target_node->get_name()).contains("@")) {
- assign->set_icon(Ref<Texture2D>());
+ assign->set_button_icon(Ref<Texture2D>());
assign->set_text(p);
return;
}
assign->set_text(target_node->get_name());
- assign->set_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node"));
+ assign->set_button_icon(EditorNode::get_singleton()->get_object_icon(target_node, "Node"));
}
void EditorPropertyNodePath::setup(const Vector<StringName> &p_valid_types, bool p_use_path_from_scene_root, bool p_editing_node) {
@@ -2865,7 +2865,7 @@ void EditorPropertyNodePath::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
menu->get_popup()->set_item_icon(ACTION_CLEAR, get_editor_theme_icon(SNAME("Clear")));
menu->get_popup()->set_item_icon(ACTION_COPY, get_editor_theme_icon(SNAME("ActionCopy")));
menu->get_popup()->set_item_icon(ACTION_EDIT, get_editor_theme_icon(SNAME("Edit")));
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index f03eef4d4d..ba6b42f8f5 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -283,7 +283,7 @@ void EditorPropertyArray::_create_new_property_slot() {
HBoxContainer *hbox = memnew(HBoxContainer);
Button *reorder_button = memnew(Button);
- reorder_button->set_icon(get_editor_theme_icon(SNAME("TripleBar")));
+ reorder_button->set_button_icon(get_editor_theme_icon(SNAME("TripleBar")));
reorder_button->set_default_cursor_shape(Control::CURSOR_MOVE);
reorder_button->set_disabled(is_read_only());
reorder_button->connect(SceneStringName(gui_input), callable_mp(this, &EditorPropertyArray::_reorder_button_gui_input));
@@ -298,13 +298,13 @@ void EditorPropertyArray::_create_new_property_slot() {
if (is_untyped_array) {
Button *edit_btn = memnew(Button);
- edit_btn->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ edit_btn->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
edit_btn->set_disabled(is_read_only());
edit_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_change_type).bind(edit_btn, idx));
hbox->add_child(edit_btn);
} else {
Button *remove_btn = memnew(Button);
- remove_btn->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ remove_btn->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
remove_btn->set_disabled(is_read_only());
remove_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_remove_pressed).bind(idx));
hbox->add_child(remove_btn);
@@ -395,7 +395,7 @@ void EditorPropertyArray::update_property() {
vbox->add_child(property_vbox);
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Element"));
- button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add_item->set_button_icon(get_editor_theme_icon(SNAME("Add")));
button_add_item->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyArray::_add_element));
button_add_item->set_disabled(is_read_only());
vbox->add_child(button_add_item);
@@ -657,7 +657,7 @@ void EditorPropertyArray::_notification(int p_what) {
}
if (button_add_item) {
- button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add_item->set_button_icon(get_editor_theme_icon(SNAME("Add")));
}
} break;
@@ -939,13 +939,13 @@ void EditorPropertyDictionary::_create_new_property_slot(int p_idx) {
if (is_untyped_dict) {
Button *edit_btn = memnew(Button);
- edit_btn->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ edit_btn->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
edit_btn->set_disabled(is_read_only());
edit_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyDictionary::_change_type).bind(edit_btn, slots.size()));
hbox->add_child(edit_btn);
} else if (p_idx >= 0) {
Button *remove_btn = memnew(Button);
- remove_btn->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ remove_btn->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
remove_btn->set_disabled(is_read_only());
remove_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyDictionary::_remove_pressed).bind(slots.size()));
hbox->add_child(remove_btn);
@@ -1122,7 +1122,7 @@ void EditorPropertyDictionary::update_property() {
_create_new_property_slot(EditorPropertyDictionaryObject::NEW_VALUE_INDEX);
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Key/Value Pair"));
- button_add_item->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
+ button_add_item->set_button_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
button_add_item->set_disabled(is_read_only());
button_add_item->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyDictionary::_add_key_value));
add_vbox->add_child(button_add_item);
@@ -1227,7 +1227,7 @@ void EditorPropertyDictionary::_notification(int p_what) {
}
if (button_add_item) {
- button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add_item->set_button_icon(get_editor_theme_icon(SNAME("Add")));
add_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("DictionaryAddItem")));
}
} break;
@@ -1424,7 +1424,7 @@ void EditorPropertyLocalizableString::update_property() {
hbox->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
Button *edit_btn = memnew(Button);
- edit_btn->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ edit_btn->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
hbox->add_child(edit_btn);
edit_btn->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLocalizableString::_remove_item).bind(edit_btn, remove_index));
@@ -1433,7 +1433,7 @@ void EditorPropertyLocalizableString::update_property() {
if (page_index == max_page) {
button_add_item = EditorInspector::create_inspector_action_button(TTR("Add Translation"));
- button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add_item->set_button_icon(get_editor_theme_icon(SNAME("Add")));
button_add_item->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyLocalizableString::_add_locale_popup));
property_vbox->add_child(button_add_item);
}
@@ -1459,7 +1459,7 @@ void EditorPropertyLocalizableString::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_ENTER_TREE: {
if (button_add_item) {
- button_add_item->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add_item->set_button_icon(get_editor_theme_icon(SNAME("Add")));
}
} break;
}
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 025d019f45..4c3fc7f8c2 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -61,11 +61,11 @@ void EditorResourcePicker::_update_resource() {
assign_button->set_custom_minimum_size(assign_button_min_size);
if (edited_resource == Ref<Resource>()) {
- assign_button->set_icon(Ref<Texture2D>());
+ assign_button->set_button_icon(Ref<Texture2D>());
assign_button->set_text(TTR("<empty>"));
assign_button->set_tooltip_text("");
} else {
- assign_button->set_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), SNAME("Object")));
+ assign_button->set_button_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), SNAME("Object")));
if (!edited_resource->get_name().is_empty()) {
assign_button->set_text(edited_resource->get_name());
@@ -103,7 +103,7 @@ void EditorResourcePicker::_update_resource_preview(const String &p_path, const
}
if (p_preview.is_valid()) {
- preview_rect->set_offset(SIDE_LEFT, assign_button->get_icon()->get_width() + assign_button->get_theme_stylebox(CoreStringName(normal))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
+ preview_rect->set_offset(SIDE_LEFT, assign_button->get_button_icon()->get_width() + assign_button->get_theme_stylebox(CoreStringName(normal))->get_content_margin(SIDE_LEFT) + get_theme_constant(SNAME("h_separation"), SNAME("Button")));
// Resource-specific stretching.
if (Ref<GradientTexture1D>(edited_resource).is_valid() || Ref<Gradient>(edited_resource).is_valid()) {
@@ -831,7 +831,7 @@ void EditorResourcePicker::_notification(int p_what) {
edit_menu->add_theme_constant_override("icon_max_width", icon_width);
}
- edit_button->set_icon(get_theme_icon(SNAME("select_arrow"), SNAME("Tree")));
+ edit_button->set_button_icon(get_theme_icon(SNAME("select_arrow"), SNAME("Tree")));
} break;
case NOTIFICATION_DRAW: {
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index e0e1ef6d19..3e7c8466a2 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -39,7 +39,7 @@
void EditorRunNative::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- remote_debug->set_icon(get_editor_theme_icon(SNAME("PlayRemote")));
+ remote_debug->set_button_icon(get_editor_theme_icon(SNAME("PlayRemote")));
} break;
case NOTIFICATION_PROCESS: {
diff --git a/editor/editor_settings_dialog.cpp b/editor/editor_settings_dialog.cpp
index d07608d852..d6742c9b55 100644
--- a/editor/editor_settings_dialog.cpp
+++ b/editor/editor_settings_dialog.cpp
@@ -285,7 +285,7 @@ void EditorSettingsDialog::_update_icons() {
shortcut_search_box->set_right_icon(shortcuts->get_editor_theme_icon(SNAME("Search")));
shortcut_search_box->set_clear_button_enabled(true);
- restart_close_button->set_icon(shortcuts->get_editor_theme_icon(SNAME("Close")));
+ restart_close_button->set_button_icon(shortcuts->get_editor_theme_icon(SNAME("Close")));
restart_container->add_theme_style_override(SceneStringName(panel), shortcuts->get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
restart_icon->set_texture(shortcuts->get_editor_theme_icon(SNAME("StatusWarning")));
restart_label->add_theme_color_override(SceneStringName(font_color), shortcuts->get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp
index 2309319376..a90c16f66e 100644
--- a/editor/export/export_template_manager.cpp
+++ b/editor/export/export_template_manager.cpp
@@ -889,7 +889,7 @@ void ExportTemplateManager::_notification(int p_what) {
current_missing_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
current_installed_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("font_disabled_color"), EditorStringName(Editor)));
- mirror_options_button->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ mirror_options_button->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index f9137082d7..a3cd6523e9 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -100,15 +100,15 @@ void ProjectExportDialog::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- duplicate_preset->set_icon(presets->get_editor_theme_icon(SNAME("Duplicate")));
- delete_preset->set_icon(presets->get_editor_theme_icon(SNAME("Remove")));
- patch_add_btn->set_icon(get_editor_theme_icon(SNAME("Add")));
+ duplicate_preset->set_button_icon(presets->get_editor_theme_icon(SNAME("Duplicate")));
+ delete_preset->set_button_icon(presets->get_editor_theme_icon(SNAME("Remove")));
+ patch_add_btn->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
case NOTIFICATION_READY: {
- duplicate_preset->set_icon(presets->get_editor_theme_icon(SNAME("Duplicate")));
- delete_preset->set_icon(presets->get_editor_theme_icon(SNAME("Remove")));
- patch_add_btn->set_icon(get_editor_theme_icon(SNAME("Add")));
+ duplicate_preset->set_button_icon(presets->get_editor_theme_icon(SNAME("Duplicate")));
+ delete_preset->set_button_icon(presets->get_editor_theme_icon(SNAME("Remove")));
+ patch_add_btn->set_button_icon(get_editor_theme_icon(SNAME("Add")));
connect(SceneStringName(confirmed), callable_mp(this, &ProjectExportDialog::_export_pck_zip));
_update_export_all();
} break;
diff --git a/editor/fbx_importer_manager.cpp b/editor/fbx_importer_manager.cpp
index 2650b642fa..f612c3bd81 100644
--- a/editor/fbx_importer_manager.cpp
+++ b/editor/fbx_importer_manager.cpp
@@ -40,7 +40,7 @@
void FBXImporterManager::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- fbx_path_browse->set_icon(get_editor_theme_icon(SNAME("FileBrowse")));
+ fbx_path_browse->set_button_icon(get_editor_theme_icon(SNAME("FileBrowse")));
} break;
case NOTIFICATION_READY: {
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 7edd514c48..c147fcca81 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -495,7 +495,7 @@ void FileSystemDock::_update_display_mode(bool p_force) {
if (p_force || old_display_mode != display_mode) {
switch (display_mode) {
case DISPLAY_MODE_TREE_ONLY:
- button_toggle_display_mode->set_icon(get_editor_theme_icon(SNAME("Panels1")));
+ button_toggle_display_mode->set_button_icon(get_editor_theme_icon(SNAME("Panels1")));
tree->show();
tree->set_v_size_flags(SIZE_EXPAND_FILL);
toolbar2_hbc->show();
@@ -512,7 +512,7 @@ void FileSystemDock::_update_display_mode(bool p_force) {
const int actual_offset = is_vertical ? split_box_offset_v : split_box_offset_h;
split_box->set_split_offset(actual_offset);
const StringName icon = is_vertical ? SNAME("Panels2") : SNAME("Panels2Alt");
- button_toggle_display_mode->set_icon(get_editor_theme_icon(icon));
+ button_toggle_display_mode->set_button_icon(get_editor_theme_icon(icon));
tree->show();
tree->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -597,7 +597,7 @@ void FileSystemDock::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
_update_display_mode(true);
- button_reload->set_icon(get_editor_theme_icon(SNAME("Reload")));
+ button_reload->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
StringName mode_icon = "Panels1";
if (display_mode == DISPLAY_MODE_VSPLIT) {
@@ -605,28 +605,28 @@ void FileSystemDock::_notification(int p_what) {
} else if (display_mode == DISPLAY_MODE_HSPLIT) {
mode_icon = "Panels2Alt";
}
- button_toggle_display_mode->set_icon(get_editor_theme_icon(mode_icon));
+ button_toggle_display_mode->set_button_icon(get_editor_theme_icon(mode_icon));
if (file_list_display_mode == FILE_LIST_DISPLAY_LIST) {
- button_file_list_display_mode->set_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
+ button_file_list_display_mode->set_button_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
} else {
- button_file_list_display_mode->set_icon(get_editor_theme_icon(SNAME("FileList")));
+ button_file_list_display_mode->set_button_icon(get_editor_theme_icon(SNAME("FileList")));
}
tree_search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- tree_button_sort->set_icon(get_editor_theme_icon(SNAME("Sort")));
+ tree_button_sort->set_button_icon(get_editor_theme_icon(SNAME("Sort")));
file_list_search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- file_list_button_sort->set_icon(get_editor_theme_icon(SNAME("Sort")));
+ file_list_button_sort->set_button_icon(get_editor_theme_icon(SNAME("Sort")));
- button_dock_placement->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ button_dock_placement->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
if (is_layout_rtl()) {
- button_hist_next->set_icon(get_editor_theme_icon(SNAME("Back")));
- button_hist_prev->set_icon(get_editor_theme_icon(SNAME("Forward")));
+ button_hist_next->set_button_icon(get_editor_theme_icon(SNAME("Back")));
+ button_hist_prev->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
} else {
- button_hist_next->set_icon(get_editor_theme_icon(SNAME("Forward")));
- button_hist_prev->set_icon(get_editor_theme_icon(SNAME("Back")));
+ button_hist_next->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
+ button_hist_prev->set_button_icon(get_editor_theme_icon(SNAME("Back")));
}
overwrite_dialog_scroll->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), "Tree"));
@@ -818,11 +818,11 @@ void FileSystemDock::_toggle_file_display() {
void FileSystemDock::_set_file_display(bool p_active) {
if (p_active) {
file_list_display_mode = FILE_LIST_DISPLAY_LIST;
- button_file_list_display_mode->set_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
+ button_file_list_display_mode->set_button_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
button_file_list_display_mode->set_tooltip_text(TTR("View items as a grid of thumbnails."));
} else {
file_list_display_mode = FILE_LIST_DISPLAY_THUMBNAILS;
- button_file_list_display_mode->set_icon(get_editor_theme_icon(SNAME("FileList")));
+ button_file_list_display_mode->set_button_icon(get_editor_theme_icon(SNAME("FileList")));
button_file_list_display_mode->set_tooltip_text(TTR("View items as a list."));
}
diff --git a/editor/group_settings_editor.cpp b/editor/group_settings_editor.cpp
index bb899af582..93d5ee0716 100644
--- a/editor/group_settings_editor.cpp
+++ b/editor/group_settings_editor.cpp
@@ -45,7 +45,7 @@ void GroupSettingsEditor::_notification(int p_what) {
update_groups();
} break;
case NOTIFICATION_THEME_CHANGED: {
- add_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ add_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
}
}
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index e0de6bbcb1..bd0805bd7e 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -373,7 +373,7 @@ void GroupsEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
filter->set_right_icon(get_editor_theme_icon("Search"));
- add->set_icon(get_editor_theme_icon("Add"));
+ add->set_button_icon(get_editor_theme_icon("Add"));
_update_tree();
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
diff --git a/editor/gui/editor_bottom_panel.cpp b/editor/gui/editor_bottom_panel.cpp
index f6ba74fe95..2eb899f085 100644
--- a/editor/gui/editor_bottom_panel.cpp
+++ b/editor/gui/editor_bottom_panel.cpp
@@ -45,7 +45,7 @@
void EditorBottomPanel::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- expand_button->set_icon(get_editor_theme_icon(SNAME("ExpandBottomDock")));
+ expand_button->set_button_icon(get_editor_theme_icon(SNAME("ExpandBottomDock")));
} break;
}
}
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp
index 1735e325fc..ceff62723f 100644
--- a/editor/gui/editor_file_dialog.cpp
+++ b/editor/gui/editor_file_dialog.cpp
@@ -1483,29 +1483,29 @@ void EditorFileDialog::_update_drives(bool p_select) {
void EditorFileDialog::_update_icons() {
// Update icons.
- mode_thumbnails->set_icon(theme_cache.mode_thumbnails);
- mode_list->set_icon(theme_cache.mode_list);
+ mode_thumbnails->set_button_icon(theme_cache.mode_thumbnails);
+ mode_list->set_button_icon(theme_cache.mode_list);
if (is_layout_rtl()) {
- dir_prev->set_icon(theme_cache.forward_folder);
- dir_next->set_icon(theme_cache.back_folder);
+ dir_prev->set_button_icon(theme_cache.forward_folder);
+ dir_next->set_button_icon(theme_cache.back_folder);
} else {
- dir_prev->set_icon(theme_cache.back_folder);
- dir_next->set_icon(theme_cache.forward_folder);
+ dir_prev->set_button_icon(theme_cache.back_folder);
+ dir_next->set_button_icon(theme_cache.forward_folder);
}
- dir_up->set_icon(theme_cache.parent_folder);
+ dir_up->set_button_icon(theme_cache.parent_folder);
- refresh->set_icon(theme_cache.reload);
- favorite->set_icon(theme_cache.favorite);
- show_hidden->set_icon(theme_cache.toggle_hidden);
- makedir->set_icon(theme_cache.create_folder);
+ refresh->set_button_icon(theme_cache.reload);
+ favorite->set_button_icon(theme_cache.favorite);
+ show_hidden->set_button_icon(theme_cache.toggle_hidden);
+ makedir->set_button_icon(theme_cache.create_folder);
filter_box->set_right_icon(theme_cache.filter_box);
- file_sort_button->set_icon(theme_cache.file_sort_button);
+ file_sort_button->set_button_icon(theme_cache.file_sort_button);
filter_box->set_clear_button_enabled(true);
- fav_up->set_icon(theme_cache.favorites_up);
- fav_down->set_icon(theme_cache.favorites_down);
+ fav_up->set_button_icon(theme_cache.favorites_up);
+ fav_down->set_button_icon(theme_cache.favorites_down);
}
void EditorFileDialog::_favorite_selected(int p_idx) {
diff --git a/editor/gui/editor_quick_open_dialog.cpp b/editor/gui/editor_quick_open_dialog.cpp
index 94a5ff94a3..a6ad002de7 100644
--- a/editor/gui/editor_quick_open_dialog.cpp
+++ b/editor/gui/editor_quick_open_dialog.cpp
@@ -613,10 +613,10 @@ void QuickOpenResultContainer::_set_display_mode(QuickOpenDisplayMode p_display_
_update_result_items(num_visible_results, selection_index);
if (content_display_mode == QuickOpenDisplayMode::LIST) {
- display_mode_toggle->set_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
+ display_mode_toggle->set_button_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
display_mode_toggle->set_tooltip_text(TTR("Grid view"));
} else {
- display_mode_toggle->set_icon(get_editor_theme_icon(SNAME("FileList")));
+ display_mode_toggle->set_button_icon(get_editor_theme_icon(SNAME("FileList")));
display_mode_toggle->set_tooltip_text(TTR("List view"));
}
}
@@ -712,9 +712,9 @@ void QuickOpenResultContainer::_notification(int p_what) {
panel_container->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
if (content_display_mode == QuickOpenDisplayMode::LIST) {
- display_mode_toggle->set_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
+ display_mode_toggle->set_button_icon(get_editor_theme_icon(SNAME("FileThumbnail")));
} else {
- display_mode_toggle->set_icon(get_editor_theme_icon(SNAME("FileList")));
+ display_mode_toggle->set_button_icon(get_editor_theme_icon(SNAME("FileList")));
}
} break;
}
diff --git a/editor/gui/editor_run_bar.cpp b/editor/gui/editor_run_bar.cpp
index 908b1e6719..64135c8d50 100644
--- a/editor/gui/editor_run_bar.cpp
+++ b/editor/gui/editor_run_bar.cpp
@@ -52,8 +52,8 @@ void EditorRunBar::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
_update_play_buttons();
- pause_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
- stop_button->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ pause_button->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
+ stop_button->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
if (is_movie_maker_enabled()) {
main_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("LaunchPadMovieMode"), EditorStringName(EditorStyles)));
@@ -63,7 +63,7 @@ void EditorRunBar::_notification(int p_what) {
write_movie_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("MovieWriterButtonNormal"), EditorStringName(EditorStyles)));
}
- write_movie_button->set_icon(get_editor_theme_icon(SNAME("MainMovieWrite")));
+ write_movie_button->set_button_icon(get_editor_theme_icon(SNAME("MainMovieWrite")));
// This button behaves differently, so color it as such.
write_movie_button->begin_bulk_theme_override();
write_movie_button->add_theme_color_override("icon_normal_color", get_theme_color(SNAME("movie_writer_icon_normal"), EditorStringName(EditorStyles)));
@@ -77,15 +77,15 @@ void EditorRunBar::_notification(int p_what) {
void EditorRunBar::_reset_play_buttons() {
play_button->set_pressed(false);
- play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
play_button->set_tooltip_text(TTR("Play the project."));
play_scene_button->set_pressed(false);
- play_scene_button->set_icon(get_editor_theme_icon(SNAME("PlayScene")));
+ play_scene_button->set_button_icon(get_editor_theme_icon(SNAME("PlayScene")));
play_scene_button->set_tooltip_text(TTR("Play the edited scene."));
play_custom_scene_button->set_pressed(false);
- play_custom_scene_button->set_icon(get_editor_theme_icon(SNAME("PlayCustom")));
+ play_custom_scene_button->set_button_icon(get_editor_theme_icon(SNAME("PlayCustom")));
play_custom_scene_button->set_tooltip_text(TTR("Play a custom scene."));
}
@@ -106,7 +106,7 @@ void EditorRunBar::_update_play_buttons() {
if (active_button) {
active_button->set_pressed(true);
- active_button->set_icon(get_editor_theme_icon(SNAME("Reload")));
+ active_button->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
active_button->set_tooltip_text(TTR("Reload the played scene."));
}
}
diff --git a/editor/gui/editor_scene_tabs.cpp b/editor/gui/editor_scene_tabs.cpp
index 4862b3436e..5b42afdbe8 100644
--- a/editor/gui/editor_scene_tabs.cpp
+++ b/editor/gui/editor_scene_tabs.cpp
@@ -53,7 +53,7 @@ void EditorSceneTabs::_notification(int p_what) {
tabbar_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("tabbar_background"), SNAME("TabContainer")));
scene_tabs->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
- scene_tab_add->set_icon(get_editor_theme_icon(SNAME("Add")));
+ scene_tab_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
scene_tab_add->add_theme_color_override("icon_normal_color", Color(0.6f, 0.6f, 0.6f, 0.8f));
scene_tab_add_ph->set_custom_minimum_size(scene_tab_add->get_minimum_size());
diff --git a/editor/gui/editor_toaster.cpp b/editor/gui/editor_toaster.cpp
index a38ed7f4c1..cc439d56b3 100644
--- a/editor/gui/editor_toaster.cpp
+++ b/editor/gui/editor_toaster.cpp
@@ -111,11 +111,11 @@ void EditorToaster::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
if (vbox_container->is_visible()) {
- main_button->set_icon(get_editor_theme_icon(SNAME("Notification")));
+ main_button->set_button_icon(get_editor_theme_icon(SNAME("Notification")));
} else {
- main_button->set_icon(get_editor_theme_icon(SNAME("NotificationDisabled")));
+ main_button->set_button_icon(get_editor_theme_icon(SNAME("NotificationDisabled")));
}
- disable_notifications_button->set_icon(get_editor_theme_icon(SNAME("NotificationDisabled")));
+ disable_notifications_button->set_button_icon(get_editor_theme_icon(SNAME("NotificationDisabled")));
// Styleboxes background.
info_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), EditorStringName(Editor)));
@@ -311,9 +311,9 @@ void EditorToaster::_draw_progress(Control *panel) {
void EditorToaster::_set_notifications_enabled(bool p_enabled) {
vbox_container->set_visible(p_enabled);
if (p_enabled) {
- main_button->set_icon(get_editor_theme_icon(SNAME("Notification")));
+ main_button->set_button_icon(get_editor_theme_icon(SNAME("Notification")));
} else {
- main_button->set_icon(get_editor_theme_icon(SNAME("NotificationDisabled")));
+ main_button->set_button_icon(get_editor_theme_icon(SNAME("NotificationDisabled")));
}
_update_disable_notifications_button();
}
@@ -375,7 +375,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_
if (p_time > 0.0) {
Button *close_button = memnew(Button);
close_button->set_flat(true);
- close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
+ close_button->set_button_icon(get_editor_theme_icon(SNAME("Close")));
close_button->connect(SceneStringName(pressed), callable_mp(this, &EditorToaster::close).bind(panel));
close_button->connect(SceneStringName(theme_changed), callable_mp(this, &EditorToaster::_close_button_theme_changed).bind(close_button));
hbox_container->add_child(close_button);
@@ -491,7 +491,7 @@ void EditorToaster::close(Control *p_control) {
void EditorToaster::_close_button_theme_changed(Control *p_close_button) {
Button *close_button = Object::cast_to<Button>(p_close_button);
if (close_button) {
- close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
+ close_button->set_button_icon(get_editor_theme_icon(SNAME("Close")));
}
}
diff --git a/editor/gui/editor_zoom_widget.cpp b/editor/gui/editor_zoom_widget.cpp
index 50a4f020ab..ff232a854f 100644
--- a/editor/gui/editor_zoom_widget.cpp
+++ b/editor/gui/editor_zoom_widget.cpp
@@ -162,8 +162,8 @@ void EditorZoomWidget::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- zoom_minus->set_icon(get_editor_theme_icon(SNAME("ZoomLess")));
- zoom_plus->set_icon(get_editor_theme_icon(SNAME("ZoomMore")));
+ zoom_minus->set_button_icon(get_editor_theme_icon(SNAME("ZoomLess")));
+ zoom_plus->set_button_icon(get_editor_theme_icon(SNAME("ZoomMore")));
} break;
}
}
diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp
index 011d0135b4..645b7fda88 100644
--- a/editor/import/3d/scene_import_settings.cpp
+++ b/editor/import/3d/scene_import_settings.cpp
@@ -1019,11 +1019,11 @@ void SceneImportSettingsDialog::_play_animation() {
if (animation_player->has_animation(id)) {
if (animation_player->is_playing()) {
animation_player->pause();
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
} else {
animation_player->play(id);
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
set_process(true);
}
}
@@ -1032,7 +1032,7 @@ void SceneImportSettingsDialog::_play_animation() {
void SceneImportSettingsDialog::_stop_current_animation() {
animation_pingpong = false;
animation_player->stop();
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
animation_slider->set_value_no_signal(0.0);
set_process(false);
}
@@ -1044,7 +1044,7 @@ void SceneImportSettingsDialog::_reset_animation(const String &p_animation_name)
if (animation_player != nullptr && animation_player->is_playing()) {
animation_player->stop();
}
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
_reset_bone_transforms();
set_process(false);
@@ -1066,7 +1066,7 @@ void SceneImportSettingsDialog::_reset_animation(const String &p_animation_name)
animation_player->play(p_animation_name);
} else {
animation_player->stop(true);
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
animation_player->set_assigned_animation(p_animation_name);
animation_player->seek(0.0, true);
animation_slider->set_value_no_signal(0.0);
@@ -1081,7 +1081,7 @@ void SceneImportSettingsDialog::_animation_slider_value_changed(double p_value)
}
if (animation_player->is_playing()) {
animation_player->stop();
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
}
animation_player->seek(p_value * animation_map[selected_id].animation->get_length(), true);
@@ -1097,7 +1097,7 @@ void SceneImportSettingsDialog::_animation_finished(const StringName &p_name) {
switch (loop_mode) {
case Animation::LOOP_NONE: {
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
animation_slider->set_value_no_signal(1.0);
set_process(false);
} break;
@@ -1318,17 +1318,17 @@ void SceneImportSettingsDialog::_notification(int p_what) {
action_menu->end_bulk_theme_override();
if (animation_player != nullptr && animation_player->is_playing()) {
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
} else {
- animation_play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ animation_play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
}
- animation_stop_button->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ animation_stop_button->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
- light_1_switch->set_icon(theme_cache.light_1_icon);
- light_2_switch->set_icon(theme_cache.light_2_icon);
- light_rotate_switch->set_icon(theme_cache.rotate_icon);
+ light_1_switch->set_button_icon(theme_cache.light_1_icon);
+ light_2_switch->set_button_icon(theme_cache.light_2_icon);
+ light_rotate_switch->set_button_icon(theme_cache.rotate_icon);
- animation_toggle_skeleton_visibility->set_icon(get_editor_theme_icon(SNAME("Skeleton3D")));
+ animation_toggle_skeleton_visibility->set_button_icon(get_editor_theme_icon(SNAME("Skeleton3D")));
} break;
case NOTIFICATION_PROCESS: {
diff --git a/editor/import/audio_stream_import_settings.cpp b/editor/import/audio_stream_import_settings.cpp
index 9a0c62193c..0367e5e3f3 100644
--- a/editor/import/audio_stream_import_settings.cpp
+++ b/editor/import/audio_stream_import_settings.cpp
@@ -45,8 +45,8 @@ void AudioStreamImportSettingsDialog::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
- _stop_button->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _stop_button->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
_preview->set_color(get_theme_color(SNAME("dark_color_2"), EditorStringName(Editor)));
color_rect->set_color(get_theme_color(SNAME("dark_color_1"), EditorStringName(Editor)));
@@ -61,9 +61,9 @@ void AudioStreamImportSettingsDialog::_notification(int p_what) {
_duration_label->add_theme_font_size_override(SceneStringName(font_size), get_theme_font_size(SNAME("status_source_size"), EditorStringName(EditorFonts)));
_duration_label->end_bulk_theme_override();
- zoom_in->set_icon(get_editor_theme_icon(SNAME("ZoomMore")));
- zoom_out->set_icon(get_editor_theme_icon(SNAME("ZoomLess")));
- zoom_reset->set_icon(get_editor_theme_icon(SNAME("ZoomReset")));
+ zoom_in->set_button_icon(get_editor_theme_icon(SNAME("ZoomMore")));
+ zoom_out->set_button_icon(get_editor_theme_icon(SNAME("ZoomLess")));
+ zoom_reset->set_button_icon(get_editor_theme_icon(SNAME("ZoomReset")));
_indicator->queue_redraw();
_preview->queue_redraw();
@@ -233,25 +233,25 @@ void AudioStreamImportSettingsDialog::_play() {
// '_pausing' variable indicates that we want to pause the audio player, not stop it. See '_on_finished()'.
_pausing = true;
_player->stop();
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
} else {
_player->play(_current);
- _play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
set_process(true);
}
}
void AudioStreamImportSettingsDialog::_stop() {
_player->stop();
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
_current = 0;
_indicator->queue_redraw();
set_process(false);
}
void AudioStreamImportSettingsDialog::_on_finished() {
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
if (!_pausing) {
_current = 0;
_indicator->queue_redraw();
diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp
index e124697b20..8bbad91b68 100644
--- a/editor/import/dynamic_font_import_settings.cpp
+++ b/editor/import/dynamic_font_import_settings.cpp
@@ -940,7 +940,7 @@ void DynamicFontImportSettingsDialog::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- add_var->set_icon(get_editor_theme_icon(SNAME("Add")));
+ add_var->set_button_icon(get_editor_theme_icon(SNAME("Add")));
label_warn->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
} break;
}
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index a686e55f57..46876644fb 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -427,11 +427,11 @@ void InspectorDock::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED:
case NOTIFICATION_TRANSLATION_CHANGED:
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
- resource_new_button->set_icon(get_editor_theme_icon(SNAME("New")));
- resource_load_button->set_icon(get_editor_theme_icon(SNAME("Load")));
- resource_save_button->set_icon(get_editor_theme_icon(SNAME("Save")));
- resource_extra_button->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
- open_docs_button->set_icon(get_editor_theme_icon(SNAME("HelpSearch")));
+ resource_new_button->set_button_icon(get_editor_theme_icon(SNAME("New")));
+ resource_load_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));
+ resource_save_button->set_button_icon(get_editor_theme_icon(SNAME("Save")));
+ resource_extra_button->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ open_docs_button->set_button_icon(get_editor_theme_icon(SNAME("HelpSearch")));
PopupMenu *resource_extra_popup = resource_extra_button->get_popup();
resource_extra_popup->set_item_icon(resource_extra_popup->get_item_index(RESOURCE_EDIT_CLIPBOARD), get_editor_theme_icon(SNAME("ActionPaste")));
@@ -439,24 +439,24 @@ void InspectorDock::_notification(int p_what) {
resource_extra_popup->set_item_icon(resource_extra_popup->get_item_index(RESOURCE_SHOW_IN_FILESYSTEM), get_editor_theme_icon(SNAME("ShowInFileSystem")));
if (is_layout_rtl()) {
- backward_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
- forward_button->set_icon(get_editor_theme_icon(SNAME("Back")));
+ backward_button->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
+ forward_button->set_button_icon(get_editor_theme_icon(SNAME("Back")));
} else {
- backward_button->set_icon(get_editor_theme_icon(SNAME("Back")));
- forward_button->set_icon(get_editor_theme_icon(SNAME("Forward")));
+ backward_button->set_button_icon(get_editor_theme_icon(SNAME("Back")));
+ forward_button->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
}
const int icon_width = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
history_menu->get_popup()->add_theme_constant_override("icon_max_width", icon_width);
- history_menu->set_icon(get_editor_theme_icon(SNAME("History")));
- object_menu->set_icon(get_editor_theme_icon(SNAME("Tools")));
+ history_menu->set_button_icon(get_editor_theme_icon(SNAME("History")));
+ object_menu->set_button_icon(get_editor_theme_icon(SNAME("Tools")));
search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
if (info_is_warning) {
- info->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ info->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
info->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
} else {
- info->set_icon(get_editor_theme_icon(SNAME("NodeInfo")));
+ info->set_button_icon(get_editor_theme_icon(SNAME("NodeInfo")));
info->add_theme_color_override(SceneStringName(font_color), get_theme_color(SceneStringName(font_color), EditorStringName(Editor)));
}
} break;
@@ -483,10 +483,10 @@ void InspectorDock::set_info(const String &p_button_text, const String &p_messag
info_is_warning = p_is_warning;
if (info_is_warning) {
- info->set_icon(get_editor_theme_icon(SNAME("NodeWarning")));
+ info->set_button_icon(get_editor_theme_icon(SNAME("NodeWarning")));
info->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
} else {
- info->set_icon(get_editor_theme_icon(SNAME("NodeInfo")));
+ info->set_button_icon(get_editor_theme_icon(SNAME("NodeInfo")));
info->add_theme_color_override(SceneStringName(font_color), get_theme_color(SceneStringName(font_color), EditorStringName(Editor)));
}
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index 0da8d8291f..985a319c84 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -52,8 +52,8 @@ void NodeDock::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- connections_button->set_icon(get_editor_theme_icon(SNAME("Signals")));
- groups_button->set_icon(get_editor_theme_icon(SNAME("Groups")));
+ connections_button->set_button_icon(get_editor_theme_icon(SNAME("Signals")));
+ groups_button->set_button_icon(get_editor_theme_icon(SNAME("Groups")));
} break;
}
}
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 804f9c607e..990b8df49d 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -158,9 +158,9 @@ void AbstractPolygon2DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- button_create->set_icon(get_editor_theme_icon(SNAME("CurveCreate")));
- button_edit->set_icon(get_editor_theme_icon(SNAME("CurveEdit")));
- button_delete->set_icon(get_editor_theme_icon(SNAME("CurveDelete")));
+ button_create->set_button_icon(get_editor_theme_icon(SNAME("CurveCreate")));
+ button_edit->set_button_icon(get_editor_theme_icon(SNAME("CurveEdit")));
+ button_delete->set_button_icon(get_editor_theme_icon(SNAME("CurveDelete")));
} break;
case NOTIFICATION_READY: {
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index cbf8b27b32..3f534eebc5 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -576,12 +576,12 @@ void AnimationNodeBlendSpace1DEditor::_notification(int p_what) {
error_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
error_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
- tool_blend->set_icon(get_editor_theme_icon(SNAME("EditPivot")));
- tool_select->set_icon(get_editor_theme_icon(SNAME("ToolSelect")));
- tool_create->set_icon(get_editor_theme_icon(SNAME("EditKey")));
- tool_erase->set_icon(get_editor_theme_icon(SNAME("Remove")));
- snap->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
- open_editor->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ tool_blend->set_button_icon(get_editor_theme_icon(SNAME("EditPivot")));
+ tool_select->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
+ tool_create->set_button_icon(get_editor_theme_icon(SNAME("EditKey")));
+ tool_erase->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
+ snap->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ open_editor->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
interpolation->clear();
interpolation->add_icon_item(get_editor_theme_icon(SNAME("TrackContinuous")), TTR("Continuous"), 0);
interpolation->add_icon_item(get_editor_theme_icon(SNAME("TrackDiscrete")), TTR("Discrete"), 1);
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 934f26415a..ba2dad5880 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -798,14 +798,14 @@ void AnimationNodeBlendSpace2DEditor::_notification(int p_what) {
error_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
error_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
- tool_blend->set_icon(get_editor_theme_icon(SNAME("EditPivot")));
- tool_select->set_icon(get_editor_theme_icon(SNAME("ToolSelect")));
- tool_create->set_icon(get_editor_theme_icon(SNAME("EditKey")));
- tool_triangle->set_icon(get_editor_theme_icon(SNAME("ToolTriangle")));
- tool_erase->set_icon(get_editor_theme_icon(SNAME("Remove")));
- snap->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
- open_editor->set_icon(get_editor_theme_icon(SNAME("Edit")));
- auto_triangles->set_icon(get_editor_theme_icon(SNAME("AutoTriangle")));
+ tool_blend->set_button_icon(get_editor_theme_icon(SNAME("EditPivot")));
+ tool_select->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
+ tool_create->set_button_icon(get_editor_theme_icon(SNAME("EditKey")));
+ tool_triangle->set_button_icon(get_editor_theme_icon(SNAME("ToolTriangle")));
+ tool_erase->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
+ snap->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ open_editor->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ auto_triangles->set_button_icon(get_editor_theme_icon(SNAME("AutoTriangle")));
interpolation->clear();
interpolation->add_icon_item(get_editor_theme_icon(SNAME("TrackContinuous")), TTR("Continuous"), 0);
interpolation->add_icon_item(get_editor_theme_icon(SNAME("TrackDiscrete")), TTR("Discrete"), 1);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 9e282cb3fa..34c0040cb7 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -178,7 +178,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
Button *delete_button = memnew(Button);
delete_button->set_flat(true);
delete_button->set_focus_mode(FOCUS_NONE);
- delete_button->set_icon(get_editor_theme_icon(SNAME("Close")));
+ delete_button->set_button_icon(get_editor_theme_icon(SNAME("Close")));
delete_button->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_delete_node_request).bind(E), CONNECT_DEFERRED);
node->get_titlebar_hbox()->add_child(delete_button);
}
@@ -216,7 +216,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
node->add_child(memnew(HSeparator));
Button *open_in_editor = memnew(Button);
open_in_editor->set_text(TTR("Open Editor"));
- open_in_editor->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ open_in_editor->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
node->add_child(open_in_editor);
open_in_editor->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_open_in_editor).bind(E), CONNECT_DEFERRED);
open_in_editor->set_h_size_flags(SIZE_SHRINK_CENTER);
@@ -230,7 +230,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
} else {
inspect_filters->set_text(TTR("Edit Filters"));
}
- inspect_filters->set_icon(get_editor_theme_icon(SNAME("AnimationFilter")));
+ inspect_filters->set_button_icon(get_editor_theme_icon(SNAME("AnimationFilter")));
node->add_child(inspect_filters);
inspect_filters->connect(SceneStringName(pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_inspect_filters).bind(E), CONNECT_DEFERRED);
inspect_filters->set_h_size_flags(SIZE_SHRINK_CENTER);
@@ -240,7 +240,7 @@ void AnimationNodeBlendTreeEditor::update_graph() {
if (anim.is_valid()) {
MenuButton *mb = memnew(MenuButton);
mb->set_text(anim->get_animation());
- mb->set_icon(get_editor_theme_icon(SNAME("Animation")));
+ mb->set_button_icon(get_editor_theme_icon(SNAME("Animation")));
mb->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
mb->set_disabled(read_only);
Array options;
@@ -1375,7 +1375,7 @@ void AnimationNodeAnimationEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
button->set_theme_type_variation(SNAME("InspectorActionButton"));
- button->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
} break;
}
}
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 147b92c094..4e8a1bd89b 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -773,8 +773,8 @@ void AnimationLibraryEditor::show_dialog() {
void AnimationLibraryEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- new_library_button->set_icon(get_editor_theme_icon(SNAME("Add")));
- load_library_button->set_icon(get_editor_theme_icon(SNAME("Load")));
+ new_library_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ load_library_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));
}
}
}
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 8bc1ec7907..d089aedc63 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -113,7 +113,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
// Need the last frame after it stopped.
frame->set_value(player->get_current_animation_position());
track_editor->set_anim_pos(player->get_current_animation_position());
- stop->set_icon(stop_icon);
+ stop->set_button_icon(stop_icon);
}
last_active = player->is_playing();
@@ -145,16 +145,16 @@ void AnimationPlayerEditor::_notification(int p_what) {
stop_icon = get_editor_theme_icon(SNAME("Stop"));
pause_icon = get_editor_theme_icon(SNAME("Pause"));
if (player && player->is_playing()) {
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
} else {
- stop->set_icon(stop_icon);
+ stop->set_button_icon(stop_icon);
}
- autoplay->set_icon(get_editor_theme_icon(SNAME("AutoPlay")));
- play->set_icon(get_editor_theme_icon(SNAME("PlayStart")));
- play_from->set_icon(get_editor_theme_icon(SNAME("Play")));
- play_bw->set_icon(get_editor_theme_icon(SNAME("PlayStartBackwards")));
- play_bw_from->set_icon(get_editor_theme_icon(SNAME("PlayBackwards")));
+ autoplay->set_button_icon(get_editor_theme_icon(SNAME("AutoPlay")));
+ play->set_button_icon(get_editor_theme_icon(SNAME("PlayStart")));
+ play_from->set_button_icon(get_editor_theme_icon(SNAME("Play")));
+ play_bw->set_button_icon(get_editor_theme_icon(SNAME("PlayStartBackwards")));
+ play_bw_from->set_button_icon(get_editor_theme_icon(SNAME("PlayBackwards")));
autoplay_icon = get_editor_theme_icon(SNAME("AutoPlay"));
reset_icon = get_editor_theme_icon(SNAME("Reload"));
@@ -168,10 +168,10 @@ void AnimationPlayerEditor::_notification(int p_what) {
autoplay_reset_icon = ImageTexture::create_from_image(autoplay_reset_img);
}
- onion_toggle->set_icon(get_editor_theme_icon(SNAME("Onion")));
- onion_skinning->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ onion_toggle->set_button_icon(get_editor_theme_icon(SNAME("Onion")));
+ onion_skinning->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
- pin->set_icon(get_editor_theme_icon(SNAME("Pin")));
+ pin->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
tool_anim->add_theme_style_override(CoreStringName(normal), get_theme_stylebox(CoreStringName(normal), SNAME("Button")));
track_editor->get_edit_menu()->add_theme_style_override(CoreStringName(normal), get_theme_stylebox(CoreStringName(normal), SNAME("Button")));
@@ -307,7 +307,7 @@ void AnimationPlayerEditor::_play_pressed() {
}
//unstop
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
}
void AnimationPlayerEditor::_play_from_pressed() {
@@ -331,7 +331,7 @@ void AnimationPlayerEditor::_play_from_pressed() {
}
//unstop
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
}
String AnimationPlayerEditor::_get_current() const {
@@ -359,7 +359,7 @@ void AnimationPlayerEditor::_play_bw_pressed() {
}
//unstop
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
}
void AnimationPlayerEditor::_play_bw_from_pressed() {
@@ -383,7 +383,7 @@ void AnimationPlayerEditor::_play_bw_from_pressed() {
}
//unstop
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
}
void AnimationPlayerEditor::_stop_pressed() {
@@ -400,7 +400,7 @@ void AnimationPlayerEditor::_stop_pressed() {
frame->set_value(0);
track_editor->set_anim_pos(0);
}
- stop->set_icon(stop_icon);
+ stop->set_button_icon(stop_icon);
}
void AnimationPlayerEditor::_animation_selected(int p_which) {
@@ -959,9 +959,9 @@ void AnimationPlayerEditor::_update_animation() {
updating = true;
if (player->is_playing()) {
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
} else {
- stop->set_icon(stop_icon);
+ stop->set_button_icon(stop_icon);
}
scale->set_text(String::num(player->get_speed_scale(), 2));
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index e9dd54f73b..d10daa2bfc 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -1271,18 +1271,18 @@ void AnimationNodeStateMachineEditor::_notification(int p_what) {
error_panel->add_theme_style_override(SceneStringName(panel), theme_cache.error_panel_style);
error_label->add_theme_color_override(SceneStringName(font_color), theme_cache.error_color);
- tool_select->set_icon(theme_cache.tool_icon_select);
- tool_create->set_icon(theme_cache.tool_icon_create);
- tool_connect->set_icon(theme_cache.tool_icon_connect);
+ tool_select->set_button_icon(theme_cache.tool_icon_select);
+ tool_create->set_button_icon(theme_cache.tool_icon_create);
+ tool_connect->set_button_icon(theme_cache.tool_icon_connect);
switch_mode->clear();
switch_mode->add_icon_item(theme_cache.transition_icon_immediate, TTR("Immediate"));
switch_mode->add_icon_item(theme_cache.transition_icon_sync, TTR("Sync"));
switch_mode->add_icon_item(theme_cache.transition_icon_end, TTR("At End"));
- auto_advance->set_icon(theme_cache.play_icon_auto);
+ auto_advance->set_button_icon(theme_cache.play_icon_auto);
- tool_erase->set_icon(theme_cache.tool_icon_erase);
+ tool_erase->set_button_icon(theme_cache.tool_icon_erase);
play_mode->clear();
play_mode->add_icon_item(theme_cache.play_icon_travel, TTR("Travel"));
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index fec8d4b897..8db106da07 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -212,12 +212,12 @@ void EditorAssetLibraryItemDescription::set_image(int p_type, int p_index, const
// Overlay and thumbnail need the same format for `blend_rect` to work.
thumbnail->convert(Image::FORMAT_RGBA8);
thumbnail->blend_rect(overlay, overlay->get_used_rect(), overlay_pos);
- preview_images[i].button->set_icon(ImageTexture::create_from_image(thumbnail));
+ preview_images[i].button->set_button_icon(ImageTexture::create_from_image(thumbnail));
// Make it clearer that clicking it will open an external link
preview_images[i].button->set_default_cursor_shape(Control::CURSOR_POINTING_HAND);
} else {
- preview_images[i].button->set_icon(p_image);
+ preview_images[i].button->set_button_icon(p_image);
}
break;
}
@@ -302,7 +302,7 @@ void EditorAssetLibraryItemDescription::add_preview(int p_id, bool p_video, cons
new_preview.video_link = p_url;
new_preview.is_video = p_video;
new_preview.button = memnew(Button);
- new_preview.button->set_icon(previews->get_editor_theme_icon(SNAME("ThumbnailWait")));
+ new_preview.button->set_button_icon(previews->get_editor_theme_icon(SNAME("ThumbnailWait")));
new_preview.button->set_toggle_mode(true);
new_preview.button->connect(SceneStringName(pressed), callable_mp(this, &EditorAssetLibraryItemDescription::_preview_click).bind(p_id));
preview_hb->add_child(new_preview.button);
diff --git a/editor/plugins/audio_stream_editor_plugin.cpp b/editor/plugins/audio_stream_editor_plugin.cpp
index f691bad3c3..23eeedea93 100644
--- a/editor/plugins/audio_stream_editor_plugin.cpp
+++ b/editor/plugins/audio_stream_editor_plugin.cpp
@@ -50,8 +50,8 @@ void AudioStreamEditor::_notification(int p_what) {
_current_label->add_theme_font_override(SceneStringName(font), font);
_duration_label->add_theme_font_override(SceneStringName(font), font);
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
- _stop_button->set_icon(get_editor_theme_icon(SNAME("Stop")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _stop_button->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
_preview->set_color(get_theme_color(SNAME("dark_color_2"), EditorStringName(Editor)));
set_color(get_theme_color(SNAME("dark_color_1"), EditorStringName(Editor)));
@@ -121,26 +121,26 @@ void AudioStreamEditor::_play() {
if (_player->is_playing()) {
_pausing = true;
_player->stop();
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
set_process(false);
} else {
_pausing = false;
_player->play(_current);
- _play_button->set_icon(get_editor_theme_icon(SNAME("Pause")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
set_process(true);
}
}
void AudioStreamEditor::_stop() {
_player->stop();
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
_current = 0;
_indicator->queue_redraw();
set_process(false);
}
void AudioStreamEditor::_on_finished() {
- _play_button->set_icon(get_editor_theme_icon(SNAME("MainPlay")));
+ _play_button->set_button_icon(get_editor_theme_icon(SNAME("MainPlay")));
if (!_pausing) {
_current = 0;
_indicator->queue_redraw();
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index d81ec21705..d9f8aae7f7 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -119,7 +119,7 @@ void BoneMapperItem::create_editor() {
hbox->add_child(skeleton_bone_selector);
picker_button = memnew(Button);
- picker_button->set_icon(get_editor_theme_icon(SNAME("ClassList")));
+ picker_button->set_button_icon(get_editor_theme_icon(SNAME("ClassList")));
picker_button->connect(SceneStringName(pressed), callable_mp(this, &BoneMapperItem::_open_picker));
hbox->add_child(picker_button);
@@ -296,7 +296,7 @@ void BoneMapper::create_editor() {
group_hbox->add_child(profile_group_selector);
clear_mapping_button = memnew(Button);
- clear_mapping_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
+ clear_mapping_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
clear_mapping_button->set_tooltip_text(TTR("Clear mappings in current group."));
clear_mapping_button->connect(SceneStringName(pressed), callable_mp(this, &BoneMapper::_clear_mapping_current_group));
group_hbox->add_child(clear_mapping_button);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 05d5f68363..51992a0b21 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3966,39 +3966,39 @@ void CanvasItemEditor::set_current_tool(Tool p_tool) {
}
void CanvasItemEditor::_update_editor_settings() {
- button_center_view->set_icon(get_editor_theme_icon(SNAME("CenterView")));
- select_button->set_icon(get_editor_theme_icon(SNAME("ToolSelect")));
+ button_center_view->set_button_icon(get_editor_theme_icon(SNAME("CenterView")));
+ select_button->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
select_sb->set_texture(get_editor_theme_icon(SNAME("EditorRect2D")));
- list_select_button->set_icon(get_editor_theme_icon(SNAME("ListSelect")));
- move_button->set_icon(get_editor_theme_icon(SNAME("ToolMove")));
- scale_button->set_icon(get_editor_theme_icon(SNAME("ToolScale")));
- rotate_button->set_icon(get_editor_theme_icon(SNAME("ToolRotate")));
- smart_snap_button->set_icon(get_editor_theme_icon(SNAME("Snap")));
- grid_snap_button->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
- snap_config_menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
- skeleton_menu->set_icon(get_editor_theme_icon(SNAME("Bone")));
- override_camera_button->set_icon(get_editor_theme_icon(SNAME("Camera2D")));
- pan_button->set_icon(get_editor_theme_icon(SNAME("ToolPan")));
- ruler_button->set_icon(get_editor_theme_icon(SNAME("Ruler")));
- pivot_button->set_icon(get_editor_theme_icon(SNAME("EditPivot")));
+ list_select_button->set_button_icon(get_editor_theme_icon(SNAME("ListSelect")));
+ move_button->set_button_icon(get_editor_theme_icon(SNAME("ToolMove")));
+ scale_button->set_button_icon(get_editor_theme_icon(SNAME("ToolScale")));
+ rotate_button->set_button_icon(get_editor_theme_icon(SNAME("ToolRotate")));
+ smart_snap_button->set_button_icon(get_editor_theme_icon(SNAME("Snap")));
+ grid_snap_button->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ snap_config_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ skeleton_menu->set_button_icon(get_editor_theme_icon(SNAME("Bone")));
+ override_camera_button->set_button_icon(get_editor_theme_icon(SNAME("Camera2D")));
+ pan_button->set_button_icon(get_editor_theme_icon(SNAME("ToolPan")));
+ ruler_button->set_button_icon(get_editor_theme_icon(SNAME("Ruler")));
+ pivot_button->set_button_icon(get_editor_theme_icon(SNAME("EditPivot")));
select_handle = get_editor_theme_icon(SNAME("EditorHandle"));
anchor_handle = get_editor_theme_icon(SNAME("EditorControlAnchor"));
- lock_button->set_icon(get_editor_theme_icon(SNAME("Lock")));
- unlock_button->set_icon(get_editor_theme_icon(SNAME("Unlock")));
- group_button->set_icon(get_editor_theme_icon(SNAME("Group")));
- ungroup_button->set_icon(get_editor_theme_icon(SNAME("Ungroup")));
- key_loc_button->set_icon(get_editor_theme_icon(SNAME("KeyPosition")));
- key_rot_button->set_icon(get_editor_theme_icon(SNAME("KeyRotation")));
- key_scale_button->set_icon(get_editor_theme_icon(SNAME("KeyScale")));
- key_insert_button->set_icon(get_editor_theme_icon(SNAME("Key")));
- key_auto_insert_button->set_icon(get_editor_theme_icon(SNAME("AutoKey")));
+ lock_button->set_button_icon(get_editor_theme_icon(SNAME("Lock")));
+ unlock_button->set_button_icon(get_editor_theme_icon(SNAME("Unlock")));
+ group_button->set_button_icon(get_editor_theme_icon(SNAME("Group")));
+ ungroup_button->set_button_icon(get_editor_theme_icon(SNAME("Ungroup")));
+ key_loc_button->set_button_icon(get_editor_theme_icon(SNAME("KeyPosition")));
+ key_rot_button->set_button_icon(get_editor_theme_icon(SNAME("KeyRotation")));
+ key_scale_button->set_button_icon(get_editor_theme_icon(SNAME("KeyScale")));
+ key_insert_button->set_button_icon(get_editor_theme_icon(SNAME("Key")));
+ key_auto_insert_button->set_button_icon(get_editor_theme_icon(SNAME("AutoKey")));
// Use a different color for the active autokey icon to make them easier
// to distinguish from the other key icons at the top. On a light theme,
// the icon will be dark, so we need to lighten it before blending it
// with the red color.
const Color key_auto_color = EditorThemeManager::is_dark_theme() ? Color(1, 1, 1) : Color(4.25, 4.25, 4.25);
key_auto_insert_button->add_theme_color_override("icon_pressed_color", key_auto_color.lerp(Color(1, 0, 0), 0.55));
- animation_menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ animation_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
context_toolbar_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("ContextualToolbar"), EditorStringName(EditorStyles)));
@@ -6266,7 +6266,7 @@ void CanvasItemEditorViewport::_update_theme() {
for (BaseButton *btn : btn_list) {
CheckBox *check = Object::cast_to<CheckBox>(btn);
- check->set_icon(get_editor_theme_icon(check->get_text()));
+ check->set_button_icon(get_editor_theme_icon(check->get_text()));
}
label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
diff --git a/editor/plugins/control_editor_plugin.cpp b/editor/plugins/control_editor_plugin.cpp
index 29dae38445..a52d949819 100644
--- a/editor/plugins/control_editor_plugin.cpp
+++ b/editor/plugins/control_editor_plugin.cpp
@@ -572,27 +572,27 @@ void AnchorPresetPicker::_notification(int p_notification) {
switch (p_notification) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- preset_buttons[PRESET_TOP_LEFT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignTopLeft")));
- preset_buttons[PRESET_CENTER_TOP]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterTop")));
- preset_buttons[PRESET_TOP_RIGHT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignTopRight")));
+ preset_buttons[PRESET_TOP_LEFT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignTopLeft")));
+ preset_buttons[PRESET_CENTER_TOP]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterTop")));
+ preset_buttons[PRESET_TOP_RIGHT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignTopRight")));
- preset_buttons[PRESET_CENTER_LEFT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterLeft")));
- preset_buttons[PRESET_CENTER]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenter")));
- preset_buttons[PRESET_CENTER_RIGHT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterRight")));
+ preset_buttons[PRESET_CENTER_LEFT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterLeft")));
+ preset_buttons[PRESET_CENTER]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenter")));
+ preset_buttons[PRESET_CENTER_RIGHT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterRight")));
- preset_buttons[PRESET_BOTTOM_LEFT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignBottomLeft")));
- preset_buttons[PRESET_CENTER_BOTTOM]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterBottom")));
- preset_buttons[PRESET_BOTTOM_RIGHT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignBottomRight")));
+ preset_buttons[PRESET_BOTTOM_LEFT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignBottomLeft")));
+ preset_buttons[PRESET_CENTER_BOTTOM]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterBottom")));
+ preset_buttons[PRESET_BOTTOM_RIGHT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignBottomRight")));
- preset_buttons[PRESET_TOP_WIDE]->set_icon(get_editor_theme_icon(SNAME("ControlAlignTopWide")));
- preset_buttons[PRESET_HCENTER_WIDE]->set_icon(get_editor_theme_icon(SNAME("ControlAlignHCenterWide")));
- preset_buttons[PRESET_BOTTOM_WIDE]->set_icon(get_editor_theme_icon(SNAME("ControlAlignBottomWide")));
+ preset_buttons[PRESET_TOP_WIDE]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignTopWide")));
+ preset_buttons[PRESET_HCENTER_WIDE]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignHCenterWide")));
+ preset_buttons[PRESET_BOTTOM_WIDE]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignBottomWide")));
- preset_buttons[PRESET_LEFT_WIDE]->set_icon(get_editor_theme_icon(SNAME("ControlAlignLeftWide")));
- preset_buttons[PRESET_VCENTER_WIDE]->set_icon(get_editor_theme_icon(SNAME("ControlAlignVCenterWide")));
- preset_buttons[PRESET_RIGHT_WIDE]->set_icon(get_editor_theme_icon(SNAME("ControlAlignRightWide")));
+ preset_buttons[PRESET_LEFT_WIDE]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignLeftWide")));
+ preset_buttons[PRESET_VCENTER_WIDE]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignVCenterWide")));
+ preset_buttons[PRESET_RIGHT_WIDE]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignRightWide")));
- preset_buttons[PRESET_FULL_RECT]->set_icon(get_editor_theme_icon(SNAME("ControlAlignFullRect")));
+ preset_buttons[PRESET_FULL_RECT]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignFullRect")));
} break;
}
}
@@ -690,17 +690,17 @@ void SizeFlagPresetPicker::_notification(int p_notification) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
if (vertical) {
- preset_buttons[SIZE_SHRINK_BEGIN]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterTop")));
- preset_buttons[SIZE_SHRINK_CENTER]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenter")));
- preset_buttons[SIZE_SHRINK_END]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterBottom")));
+ preset_buttons[SIZE_SHRINK_BEGIN]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterTop")));
+ preset_buttons[SIZE_SHRINK_CENTER]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenter")));
+ preset_buttons[SIZE_SHRINK_END]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterBottom")));
- preset_buttons[SIZE_FILL]->set_icon(get_editor_theme_icon(SNAME("ControlAlignVCenterWide")));
+ preset_buttons[SIZE_FILL]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignVCenterWide")));
} else {
- preset_buttons[SIZE_SHRINK_BEGIN]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterLeft")));
- preset_buttons[SIZE_SHRINK_CENTER]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenter")));
- preset_buttons[SIZE_SHRINK_END]->set_icon(get_editor_theme_icon(SNAME("ControlAlignCenterRight")));
+ preset_buttons[SIZE_SHRINK_BEGIN]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterLeft")));
+ preset_buttons[SIZE_SHRINK_CENTER]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenter")));
+ preset_buttons[SIZE_SHRINK_END]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignCenterRight")));
- preset_buttons[SIZE_FILL]->set_icon(get_editor_theme_icon(SNAME("ControlAlignHCenterWide")));
+ preset_buttons[SIZE_FILL]->set_button_icon(get_editor_theme_icon(SNAME("ControlAlignHCenterWide")));
}
} break;
}
@@ -1050,9 +1050,9 @@ void ControlEditorToolbar::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- anchors_button->set_icon(get_editor_theme_icon(SNAME("ControlLayout")));
- anchor_mode_button->set_icon(get_editor_theme_icon(SNAME("Anchor")));
- containers_button->set_icon(get_editor_theme_icon(SNAME("ContainerLayout")));
+ anchors_button->set_button_icon(get_editor_theme_icon(SNAME("ControlLayout")));
+ anchor_mode_button->set_button_icon(get_editor_theme_icon(SNAME("Anchor")));
+ containers_button->set_button_icon(get_editor_theme_icon(SNAME("ContainerLayout")));
} break;
}
}
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index e518cf7815..67006af44b 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -972,7 +972,7 @@ void CurveEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
spacing = Math::round(BASE_SPACING * get_theme_default_base_scale());
- snap_button->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ snap_button->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
PopupMenu *p = presets_button->get_popup();
p->clear();
p->add_icon_item(get_editor_theme_icon(SNAME("CurveConstant")), TTR("Constant"), CurveEdit::PRESET_CONSTANT);
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index 6366d20539..d27e85495c 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -149,7 +149,7 @@ void EditorPropertyFontMetaOverride::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
if (button_add) {
- button_add->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
}
} break;
}
@@ -295,7 +295,7 @@ void EditorPropertyFontMetaOverride::update_property() {
hbox->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
Button *remove = memnew(Button);
- remove->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ remove->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
hbox->add_child(remove);
remove->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_remove).bind(remove, name));
@@ -552,7 +552,7 @@ void EditorPropertyOTFeatures::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
if (button_add) {
- button_add->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
}
} break;
}
@@ -789,7 +789,7 @@ void EditorPropertyOTFeatures::update_property() {
hbox->add_child(prop);
prop->set_h_size_flags(SIZE_EXPAND_FILL);
Button *remove = memnew(Button);
- remove->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ remove->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
hbox->add_child(remove);
remove->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_remove).bind(remove, name_tag));
@@ -798,7 +798,7 @@ void EditorPropertyOTFeatures::update_property() {
}
button_add = EditorInspector::create_inspector_action_button(TTR("Add Feature"));
- button_add->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
button_add->connect(SceneStringName(pressed), callable_mp(this, &EditorPropertyOTFeatures::_add_menu));
property_vbox->add_child(button_add);
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
index c21a1b5dd6..4c2a3b60f8 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
@@ -181,7 +181,7 @@ GPUParticlesCollisionSDF3DEditorPlugin::GPUParticlesCollisionSDF3DEditorPlugin()
bake_hb->hide();
bake = memnew(Button);
bake->set_theme_type_variation("FlatButton");
- bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
+ bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
bake->set_text(TTR("Bake SDF"));
bake->connect(SceneStringName(pressed), callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
bake_hb->add_child(bake);
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 1300394ca3..291ffc24d2 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -604,8 +604,8 @@ void GradientEditor::set_gradient(const Ref<Gradient> &p_gradient) {
void GradientEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- reverse_button->set_icon(get_editor_theme_icon(SNAME("ReverseGradient")));
- snap_button->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ reverse_button->set_button_icon(get_editor_theme_icon(SNAME("ReverseGradient")));
+ snap_button->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
} break;
case NOTIFICATION_READY: {
Ref<Gradient> gradient = gradient_editor_rect->get_gradient();
diff --git a/editor/plugins/gradient_texture_2d_editor_plugin.cpp b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
index 5bf1422780..46c9f4501b 100644
--- a/editor/plugins/gradient_texture_2d_editor_plugin.cpp
+++ b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
@@ -262,8 +262,8 @@ void GradientTexture2DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- reverse_button->set_icon(get_editor_theme_icon(SNAME("ReverseGradient")));
- snap_button->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ reverse_button->set_button_icon(get_editor_theme_icon(SNAME("ReverseGradient")));
+ snap_button->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
} break;
case NOTIFICATION_READY: {
if (texture.is_valid()) {
diff --git a/editor/plugins/input_event_editor_plugin.cpp b/editor/plugins/input_event_editor_plugin.cpp
index 30debfc14f..0c3ceff977 100644
--- a/editor/plugins/input_event_editor_plugin.cpp
+++ b/editor/plugins/input_event_editor_plugin.cpp
@@ -37,7 +37,7 @@ void InputEventConfigContainer::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- open_config_button->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ open_config_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
} break;
}
}
diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp
index 854ab7de8f..6e5dfd44d4 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.cpp
+++ b/editor/plugins/lightmap_gi_editor_plugin.cpp
@@ -177,7 +177,7 @@ LightmapGIEditorPlugin::LightmapGIEditorPlugin() {
bake->set_theme_type_variation("FlatButton");
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
// when the editor theme updates.
- bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
+ bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
bake->set_text(TTR("Bake Lightmaps"));
#ifdef MODULE_LIGHTMAPPER_RD_ENABLED
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 2702b6c909..be44d57376 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -77,11 +77,11 @@ void MaterialEditor::_update_theme_item_cache() {
void MaterialEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- light_1_switch->set_icon(theme_cache.light_1_icon);
- light_2_switch->set_icon(theme_cache.light_2_icon);
+ light_1_switch->set_button_icon(theme_cache.light_1_icon);
+ light_2_switch->set_button_icon(theme_cache.light_2_icon);
- sphere_switch->set_icon(theme_cache.sphere_icon);
- box_switch->set_icon(theme_cache.box_icon);
+ sphere_switch->set_button_icon(theme_cache.sphere_icon);
+ box_switch->set_button_icon(theme_cache.box_icon);
error_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
} break;
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index c8eda600b8..645dd1784e 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -58,8 +58,8 @@ void MeshEditor::_update_theme_item_cache() {
void MeshEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- light_1_switch->set_icon(theme_cache.light_1_icon);
- light_2_switch->set_icon(theme_cache.light_2_icon);
+ light_1_switch->set_button_icon(theme_cache.light_1_icon);
+ light_2_switch->set_button_icon(theme_cache.light_2_icon);
} break;
}
}
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index eda6cdffb1..48dcd2e6fc 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -527,7 +527,7 @@ void MeshInstance3DEditor::_create_outline_mesh() {
void MeshInstance3DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- options->set_icon(get_editor_theme_icon(SNAME("MeshInstance3D")));
+ options->set_button_icon(get_editor_theme_icon(SNAME("MeshInstance3D")));
} break;
}
}
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index d6650bd08f..6f79ab0529 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -260,7 +260,7 @@ MeshLibraryEditor::MeshLibraryEditor() {
Node3DEditor::get_singleton()->add_control_to_menu_panel(menu);
menu->set_position(Point2(1, 1));
menu->set_text(TTR("MeshLibrary"));
- menu->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MeshLibrary"), EditorStringName(EditorIcons)));
+ menu->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MeshLibrary"), EditorStringName(EditorIcons)));
menu->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
menu->get_popup()->add_item(TTR("Remove Selected Item"), MENU_OPTION_REMOVE_ITEM);
menu->get_popup()->add_separator();
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 729ceccd25..9e686dd689 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -272,7 +272,7 @@ MultiMeshEditor::MultiMeshEditor() {
Node3DEditor::get_singleton()->add_control_to_menu_panel(options);
options->set_text("MultiMesh");
- options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MultiMeshInstance3D"), EditorStringName(EditorIcons)));
+ options->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MultiMeshInstance3D"), EditorStringName(EditorIcons)));
options->get_popup()->add_item(TTR("Populate Surface"));
options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MultiMeshEditor::_menu_option));
diff --git a/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp b/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp
index 9629a673e9..2eaab0fcbd 100644
--- a/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp
+++ b/editor/plugins/navigation_obstacle_3d_editor_plugin.cpp
@@ -46,8 +46,8 @@
void NavigationObstacle3DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
- button_create->set_icon(get_editor_theme_icon(SNAME("Edit")));
- button_edit->set_icon(get_editor_theme_icon(SNAME("MovePoint")));
+ button_create->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ button_edit->set_button_icon(get_editor_theme_icon(SNAME("MovePoint")));
button_edit->set_pressed(true);
get_tree()->connect("node_removed", callable_mp(this, &NavigationObstacle3DEditor::_node_removed));
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index ec59bbb543..3c71040408 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -177,8 +177,8 @@ NavigationPolygonEditor::NavigationPolygonEditor() {
void NavigationPolygonEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- button_bake->set_icon(get_editor_theme_icon(SNAME("Bake")));
- button_reset->set_icon(get_editor_theme_icon(SNAME("Reload")));
+ button_bake->set_button_icon(get_editor_theme_icon(SNAME("Bake")));
+ button_reset->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
if (rebake_timer) {
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 0df0274495..6fc73f69dd 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -3139,8 +3139,8 @@ void Node3DEditorViewport::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- view_menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
- preview_camera->set_icon(get_editor_theme_icon(SNAME("Camera3D")));
+ view_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ preview_camera->set_button_icon(get_editor_theme_icon(SNAME("Camera3D")));
Control *gui_base = EditorNode::get_singleton()->get_gui_base();
const Ref<StyleBox> &information_3d_stylebox = gui_base->get_theme_stylebox(SNAME("Information3dViewport"), EditorStringName(EditorStyles));
@@ -8021,19 +8021,19 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) {
}
void Node3DEditor::_update_theme() {
- tool_button[TOOL_MODE_SELECT]->set_icon(get_editor_theme_icon(SNAME("ToolSelect")));
- tool_button[TOOL_MODE_MOVE]->set_icon(get_editor_theme_icon(SNAME("ToolMove")));
- tool_button[TOOL_MODE_ROTATE]->set_icon(get_editor_theme_icon(SNAME("ToolRotate")));
- tool_button[TOOL_MODE_SCALE]->set_icon(get_editor_theme_icon(SNAME("ToolScale")));
- tool_button[TOOL_MODE_LIST_SELECT]->set_icon(get_editor_theme_icon(SNAME("ListSelect")));
- tool_button[TOOL_LOCK_SELECTED]->set_icon(get_editor_theme_icon(SNAME("Lock")));
- tool_button[TOOL_UNLOCK_SELECTED]->set_icon(get_editor_theme_icon(SNAME("Unlock")));
- tool_button[TOOL_GROUP_SELECTED]->set_icon(get_editor_theme_icon(SNAME("Group")));
- tool_button[TOOL_UNGROUP_SELECTED]->set_icon(get_editor_theme_icon(SNAME("Ungroup")));
-
- tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_icon(get_editor_theme_icon(SNAME("Object")));
- tool_option_button[TOOL_OPT_USE_SNAP]->set_icon(get_editor_theme_icon(SNAME("Snap")));
- tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_icon(get_editor_theme_icon(SNAME("Camera3D")));
+ tool_button[TOOL_MODE_SELECT]->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
+ tool_button[TOOL_MODE_MOVE]->set_button_icon(get_editor_theme_icon(SNAME("ToolMove")));
+ tool_button[TOOL_MODE_ROTATE]->set_button_icon(get_editor_theme_icon(SNAME("ToolRotate")));
+ tool_button[TOOL_MODE_SCALE]->set_button_icon(get_editor_theme_icon(SNAME("ToolScale")));
+ tool_button[TOOL_MODE_LIST_SELECT]->set_button_icon(get_editor_theme_icon(SNAME("ListSelect")));
+ tool_button[TOOL_LOCK_SELECTED]->set_button_icon(get_editor_theme_icon(SNAME("Lock")));
+ tool_button[TOOL_UNLOCK_SELECTED]->set_button_icon(get_editor_theme_icon(SNAME("Unlock")));
+ tool_button[TOOL_GROUP_SELECTED]->set_button_icon(get_editor_theme_icon(SNAME("Group")));
+ tool_button[TOOL_UNGROUP_SELECTED]->set_button_icon(get_editor_theme_icon(SNAME("Ungroup")));
+
+ tool_option_button[TOOL_OPT_LOCAL_COORDS]->set_button_icon(get_editor_theme_icon(SNAME("Object")));
+ tool_option_button[TOOL_OPT_USE_SNAP]->set_button_icon(get_editor_theme_icon(SNAME("Snap")));
+ tool_option_button[TOOL_OPT_OVERRIDE_CAMERA]->set_button_icon(get_editor_theme_icon(SNAME("Camera3D")));
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_editor_theme_icon(SNAME("Panels1")));
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_editor_theme_icon(SNAME("Panels2")));
@@ -8042,9 +8042,9 @@ void Node3DEditor::_update_theme() {
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_editor_theme_icon(SNAME("Panels3Alt")));
view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_editor_theme_icon(SNAME("Panels4")));
- sun_button->set_icon(get_editor_theme_icon(SNAME("PreviewSun")));
- environ_button->set_icon(get_editor_theme_icon(SNAME("PreviewEnvironment")));
- sun_environ_settings->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ sun_button->set_button_icon(get_editor_theme_icon(SNAME("PreviewSun")));
+ environ_button->set_button_icon(get_editor_theme_icon(SNAME("PreviewEnvironment")));
+ sun_environ_settings->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
sun_title->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("title_font"), SNAME("Window")));
environ_title->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("title_font"), SNAME("Window")));
diff --git a/editor/plugins/occluder_instance_3d_editor_plugin.cpp b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
index c14d9e02aa..b9c884178f 100644
--- a/editor/plugins/occluder_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/occluder_instance_3d_editor_plugin.cpp
@@ -105,7 +105,7 @@ void OccluderInstance3DEditorPlugin::_bind_methods() {
OccluderInstance3DEditorPlugin::OccluderInstance3DEditorPlugin() {
bake = memnew(Button);
bake->set_theme_type_variation("FlatButton");
- bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
+ bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
bake->set_text(TTR("Bake Occluders"));
bake->hide();
bake->connect(SceneStringName(pressed), Callable(this, "_bake"));
diff --git a/editor/plugins/packed_scene_editor_plugin.cpp b/editor/plugins/packed_scene_editor_plugin.cpp
index c2d9851c17..4684c5a456 100644
--- a/editor/plugins/packed_scene_editor_plugin.cpp
+++ b/editor/plugins/packed_scene_editor_plugin.cpp
@@ -43,7 +43,7 @@ void PackedSceneEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- open_scene_button->set_icon(get_editor_theme_icon(SNAME("PackedScene")));
+ open_scene_button->set_button_icon(get_editor_theme_icon(SNAME("PackedScene")));
} break;
}
}
diff --git a/editor/plugins/parallax_background_editor_plugin.cpp b/editor/plugins/parallax_background_editor_plugin.cpp
index 6c55fd2753..e802f42596 100644
--- a/editor/plugins/parallax_background_editor_plugin.cpp
+++ b/editor/plugins/parallax_background_editor_plugin.cpp
@@ -119,7 +119,7 @@ void ParallaxBackgroundEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ParallaxBackgroundEditorPlugin::_menu_callback));
- menu->set_icon(menu->get_editor_theme_icon(SNAME("ParallaxBackground")));
+ menu->set_button_icon(menu->get_editor_theme_icon(SNAME("ParallaxBackground")));
} break;
}
}
diff --git a/editor/plugins/particle_process_material_editor_plugin.cpp b/editor/plugins/particle_process_material_editor_plugin.cpp
index 67c9403aaf..7b46653ac7 100644
--- a/editor/plugins/particle_process_material_editor_plugin.cpp
+++ b/editor/plugins/particle_process_material_editor_plugin.cpp
@@ -346,7 +346,7 @@ float ParticleProcessMaterialMinMaxPropertyEditor::_get_max_spread() const {
void ParticleProcessMaterialMinMaxPropertyEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- toggle_mode_button->set_icon(get_editor_theme_icon(SNAME("Anchor")));
+ toggle_mode_button->set_button_icon(get_editor_theme_icon(SNAME("Anchor")));
range_slider_left_icon = get_editor_theme_icon(SNAME("RangeSliderLeft"));
range_slider_right_icon = get_editor_theme_icon(SNAME("RangeSliderRight"));
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index 34f5dcf963..36a2d7acad 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -60,7 +60,7 @@ void ParticlesEditorPlugin::_notification(int p_what) {
DEV_ASSERT(false);
}
- menu->set_icon(menu->get_editor_theme_icon(handled_type));
+ menu->set_button_icon(menu->get_editor_theme_icon(handled_type));
menu->set_text(handled_type);
PopupMenu *popup = menu->get_popup();
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index c96f23869e..96e022e230 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -43,14 +43,14 @@
void Path2DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- curve_edit->set_icon(get_editor_theme_icon(SNAME("CurveEdit")));
- curve_edit_curve->set_icon(get_editor_theme_icon(SNAME("CurveCurve")));
- curve_create->set_icon(get_editor_theme_icon(SNAME("CurveCreate")));
- curve_del->set_icon(get_editor_theme_icon(SNAME("CurveDelete")));
- curve_close->set_icon(get_editor_theme_icon(SNAME("CurveClose")));
- curve_clear_points->set_icon(get_editor_theme_icon(SNAME("Clear")));
-
- create_curve_button->set_icon(get_editor_theme_icon(SNAME("Curve2D")));
+ curve_edit->set_button_icon(get_editor_theme_icon(SNAME("CurveEdit")));
+ curve_edit_curve->set_button_icon(get_editor_theme_icon(SNAME("CurveCurve")));
+ curve_create->set_button_icon(get_editor_theme_icon(SNAME("CurveCreate")));
+ curve_del->set_button_icon(get_editor_theme_icon(SNAME("CurveDelete")));
+ curve_close->set_button_icon(get_editor_theme_icon(SNAME("CurveClose")));
+ curve_clear_points->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
+
+ create_curve_button->set_button_icon(get_editor_theme_icon(SNAME("Curve2D")));
} break;
}
}
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 4fdcb79696..91cff9f8e2 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -790,14 +790,14 @@ void Path3DEditorPlugin::_restore_curve_points(const PackedVector3Array &p_point
}
void Path3DEditorPlugin::_update_theme() {
- curve_edit->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveEdit")));
- curve_edit_curve->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveCurve")));
- curve_edit_tilt->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveTilt")));
- curve_create->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveCreate")));
- curve_del->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveDelete")));
- curve_close->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveClose")));
- curve_clear_points->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("Clear")));
- create_curve_button->set_icon(topmenu_bar->get_editor_theme_icon(SNAME("Curve3D")));
+ curve_edit->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveEdit")));
+ curve_edit_curve->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveCurve")));
+ curve_edit_tilt->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveTilt")));
+ curve_create->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveCreate")));
+ curve_del->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveDelete")));
+ curve_close->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("CurveClose")));
+ curve_clear_points->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("Clear")));
+ create_curve_button->set_button_icon(topmenu_bar->get_editor_theme_icon(SNAME("Curve3D")));
}
void Path3DEditorPlugin::_update_toolbar() {
diff --git a/editor/plugins/physical_bone_3d_editor_plugin.cpp b/editor/plugins/physical_bone_3d_editor_plugin.cpp
index c858fa8606..15a957d5c4 100644
--- a/editor/plugins/physical_bone_3d_editor_plugin.cpp
+++ b/editor/plugins/physical_bone_3d_editor_plugin.cpp
@@ -60,7 +60,7 @@ PhysicalBone3DEditor::PhysicalBone3DEditor() {
button_transform_joint->set_text(TTR("Move Joint"));
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
// when the editor theme updates.
- button_transform_joint->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("PhysicalBone3D"), EditorStringName(EditorIcons)));
+ button_transform_joint->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("PhysicalBone3D"), EditorStringName(EditorIcons)));
button_transform_joint->set_toggle_mode(true);
button_transform_joint->connect(SceneStringName(toggled), callable_mp(this, &PhysicalBone3DEditor::_on_toggle_button_transform_joint));
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 842142db79..6cd04174a5 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -111,22 +111,22 @@ void Polygon2DEditor::_notification(int p_what) {
} break;
case NOTIFICATION_READY: {
- button_uv->set_icon(get_editor_theme_icon(SNAME("Uv")));
-
- uv_button[UV_MODE_CREATE]->set_icon(get_editor_theme_icon(SNAME("Edit")));
- uv_button[UV_MODE_CREATE_INTERNAL]->set_icon(get_editor_theme_icon(SNAME("EditInternal")));
- uv_button[UV_MODE_REMOVE_INTERNAL]->set_icon(get_editor_theme_icon(SNAME("RemoveInternal")));
- uv_button[UV_MODE_EDIT_POINT]->set_icon(get_editor_theme_icon(SNAME("ToolSelect")));
- uv_button[UV_MODE_MOVE]->set_icon(get_editor_theme_icon(SNAME("ToolMove")));
- uv_button[UV_MODE_ROTATE]->set_icon(get_editor_theme_icon(SNAME("ToolRotate")));
- uv_button[UV_MODE_SCALE]->set_icon(get_editor_theme_icon(SNAME("ToolScale")));
- uv_button[UV_MODE_ADD_POLYGON]->set_icon(get_editor_theme_icon(SNAME("Edit")));
- uv_button[UV_MODE_REMOVE_POLYGON]->set_icon(get_editor_theme_icon(SNAME("Close")));
- uv_button[UV_MODE_PAINT_WEIGHT]->set_icon(get_editor_theme_icon(SNAME("Bucket")));
- uv_button[UV_MODE_CLEAR_WEIGHT]->set_icon(get_editor_theme_icon(SNAME("Clear")));
-
- b_snap_grid->set_icon(get_editor_theme_icon(SNAME("Grid")));
- b_snap_enable->set_icon(get_editor_theme_icon(SNAME("SnapGrid")));
+ button_uv->set_button_icon(get_editor_theme_icon(SNAME("Uv")));
+
+ uv_button[UV_MODE_CREATE]->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ uv_button[UV_MODE_CREATE_INTERNAL]->set_button_icon(get_editor_theme_icon(SNAME("EditInternal")));
+ uv_button[UV_MODE_REMOVE_INTERNAL]->set_button_icon(get_editor_theme_icon(SNAME("RemoveInternal")));
+ uv_button[UV_MODE_EDIT_POINT]->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
+ uv_button[UV_MODE_MOVE]->set_button_icon(get_editor_theme_icon(SNAME("ToolMove")));
+ uv_button[UV_MODE_ROTATE]->set_button_icon(get_editor_theme_icon(SNAME("ToolRotate")));
+ uv_button[UV_MODE_SCALE]->set_button_icon(get_editor_theme_icon(SNAME("ToolScale")));
+ uv_button[UV_MODE_ADD_POLYGON]->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ uv_button[UV_MODE_REMOVE_POLYGON]->set_button_icon(get_editor_theme_icon(SNAME("Close")));
+ uv_button[UV_MODE_PAINT_WEIGHT]->set_button_icon(get_editor_theme_icon(SNAME("Bucket")));
+ uv_button[UV_MODE_CLEAR_WEIGHT]->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
+
+ b_snap_grid->set_button_icon(get_editor_theme_icon(SNAME("Grid")));
+ b_snap_enable->set_button_icon(get_editor_theme_icon(SNAME("SnapGrid")));
uv_vscroll->set_anchors_and_offsets_preset(PRESET_RIGHT_WIDE);
uv_hscroll->set_anchors_and_offsets_preset(PRESET_BOTTOM_WIDE);
diff --git a/editor/plugins/polygon_3d_editor_plugin.cpp b/editor/plugins/polygon_3d_editor_plugin.cpp
index 56baa4a839..9bb2d81549 100644
--- a/editor/plugins/polygon_3d_editor_plugin.cpp
+++ b/editor/plugins/polygon_3d_editor_plugin.cpp
@@ -46,8 +46,8 @@
void Polygon3DEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_READY: {
- button_create->set_icon(get_editor_theme_icon(SNAME("Edit")));
- button_edit->set_icon(get_editor_theme_icon(SNAME("MovePoint")));
+ button_create->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ button_edit->set_button_icon(get_editor_theme_icon(SNAME("MovePoint")));
button_edit->set_pressed(true);
get_tree()->connect("node_removed", callable_mp(this, &Polygon3DEditor::_node_removed));
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index ba6699fcc4..bb0607a3c6 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -45,7 +45,7 @@ void ResourcePreloaderEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- load->set_icon(get_editor_theme_icon(SNAME("Folder")));
+ load->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
} break;
}
}
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index cd422fc291..0a4e3d78c8 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -169,13 +169,13 @@ void EditorPropertyRootMotion::update_property() {
NodePath p = get_edited_property_value();
assign->set_tooltip_text(p);
if (p == NodePath()) {
- assign->set_icon(Ref<Texture2D>());
+ assign->set_button_icon(Ref<Texture2D>());
assign->set_text(TTR("Assign..."));
assign->set_flat(false);
return;
}
- assign->set_icon(Ref<Texture2D>());
+ assign->set_button_icon(Ref<Texture2D>());
assign->set_text(p);
}
@@ -188,7 +188,7 @@ void EditorPropertyRootMotion::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
Ref<Texture2D> t = get_editor_theme_icon(SNAME("Clear"));
- clear->set_icon(t);
+ clear->set_button_icon(t);
} break;
}
}
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 96a9dd7a80..2edc096382 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1780,18 +1780,18 @@ void ScriptEditor::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
tab_container->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("ScriptEditor"), EditorStringName(EditorStyles)));
- help_search->set_icon(get_editor_theme_icon(SNAME("HelpSearch")));
- site_search->set_icon(get_editor_theme_icon(SNAME("ExternalLink")));
+ help_search->set_button_icon(get_editor_theme_icon(SNAME("HelpSearch")));
+ site_search->set_button_icon(get_editor_theme_icon(SNAME("ExternalLink")));
if (is_layout_rtl()) {
- script_forward->set_icon(get_editor_theme_icon(SNAME("Back")));
- script_back->set_icon(get_editor_theme_icon(SNAME("Forward")));
+ script_forward->set_button_icon(get_editor_theme_icon(SNAME("Back")));
+ script_back->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
} else {
- script_forward->set_icon(get_editor_theme_icon(SNAME("Forward")));
- script_back->set_icon(get_editor_theme_icon(SNAME("Back")));
+ script_forward->set_button_icon(get_editor_theme_icon(SNAME("Forward")));
+ script_back->set_button_icon(get_editor_theme_icon(SNAME("Back")));
}
- members_overview_alphabeta_sort_button->set_icon(get_editor_theme_icon(SNAME("Sort")));
+ members_overview_alphabeta_sort_button->set_button_icon(get_editor_theme_icon(SNAME("Sort")));
filter_scripts->set_right_icon(get_editor_theme_icon(SNAME("Search")));
filter_methods->set_right_icon(get_editor_theme_icon(SNAME("Search")));
diff --git a/editor/plugins/shader_file_editor_plugin.cpp b/editor/plugins/shader_file_editor_plugin.cpp
index d732d51f69..d2fd9b1cc0 100644
--- a/editor/plugins/shader_file_editor_plugin.cpp
+++ b/editor/plugins/shader_file_editor_plugin.cpp
@@ -63,7 +63,7 @@ void ShaderFileEditor::_version_selected(int p_option) {
for (int i = 0; i < RD::SHADER_STAGE_MAX; i++) {
if (bytecode->get_stage_bytecode(RD::ShaderStage(i)).is_empty() && bytecode->get_stage_compile_error(RD::ShaderStage(i)) == String()) {
- stages[i]->set_icon(Ref<Texture2D>());
+ stages[i]->set_button_icon(Ref<Texture2D>());
continue;
}
@@ -73,7 +73,7 @@ void ShaderFileEditor::_version_selected(int p_option) {
} else {
icon = get_editor_theme_icon(SNAME("ImportCheck"));
}
- stages[i]->set_icon(icon);
+ stages[i]->set_button_icon(icon);
if (first_found == -1) {
first_found = i;
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index 8f54641dcb..97ad0ff640 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -96,7 +96,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
options->set_text(TTR("Skeleton2D"));
- options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Skeleton2D"), EditorStringName(EditorIcons)));
+ options->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Skeleton2D"), EditorStringName(EditorIcons)));
options->get_popup()->add_item(TTR("Reset to Rest Pose"), MENU_OPTION_SET_REST);
options->get_popup()->add_separator();
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index 9a5d02d9e7..19fbd2dd3b 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -123,7 +123,7 @@ void BonePropertiesEditor::_notification(int p_what) {
const Color section_color = get_theme_color(SNAME("prop_subsection"), EditorStringName(Editor));
section->set_bg_color(section_color);
rest_section->set_bg_color(section_color);
- add_metadata_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ add_metadata_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
}
}
@@ -1136,13 +1136,13 @@ void Skeleton3DEditor::_notification(int p_what) {
add_theme_constant_override("separation", 0);
} break;
case NOTIFICATION_THEME_CHANGED: {
- skeleton_options->set_icon(get_editor_theme_icon(SNAME("Skeleton3D")));
- edit_mode_button->set_icon(get_editor_theme_icon(SNAME("ToolBoneSelect")));
- key_loc_button->set_icon(get_editor_theme_icon(SNAME("KeyPosition")));
- key_rot_button->set_icon(get_editor_theme_icon(SNAME("KeyRotation")));
- key_scale_button->set_icon(get_editor_theme_icon(SNAME("KeyScale")));
- key_insert_button->set_icon(get_editor_theme_icon(SNAME("Key")));
- key_insert_all_button->set_icon(get_editor_theme_icon(SNAME("NewKey")));
+ skeleton_options->set_button_icon(get_editor_theme_icon(SNAME("Skeleton3D")));
+ edit_mode_button->set_button_icon(get_editor_theme_icon(SNAME("ToolBoneSelect")));
+ key_loc_button->set_button_icon(get_editor_theme_icon(SNAME("KeyPosition")));
+ key_rot_button->set_button_icon(get_editor_theme_icon(SNAME("KeyRotation")));
+ key_scale_button->set_button_icon(get_editor_theme_icon(SNAME("KeyScale")));
+ key_insert_button->set_button_icon(get_editor_theme_icon(SNAME("Key")));
+ key_insert_all_button->set_button_icon(get_editor_theme_icon(SNAME("NewKey")));
bones_section->set_bg_color(get_theme_color(SNAME("prop_subsection"), EditorStringName(Editor)));
update_joint_tree();
diff --git a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
index 9b98b6ffa2..d0c8744dc2 100644
--- a/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_ik_3d_editor_plugin.cpp
@@ -75,7 +75,7 @@ void SkeletonIK3DEditorPlugin::make_visible(bool p_visible) {
SkeletonIK3DEditorPlugin::SkeletonIK3DEditorPlugin() {
play_btn = memnew(Button);
- play_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Play"), EditorStringName(EditorIcons)));
+ play_btn->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Play"), EditorStringName(EditorIcons)));
play_btn->set_text(TTR("Play IK"));
play_btn->set_toggle_mode(true);
play_btn->hide();
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 5333e10b56..c365ad6133 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -560,7 +560,7 @@ void Sprite2DEditor::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- options->set_icon(get_editor_theme_icon(SNAME("Sprite2D")));
+ options->set_button_icon(get_editor_theme_icon(SNAME("Sprite2D")));
options->get_popup()->set_item_icon(MENU_OPTION_CONVERT_TO_MESH_2D, get_editor_theme_icon(SNAME("MeshInstance2D")));
options->get_popup()->set_item_icon(MENU_OPTION_CONVERT_TO_POLYGON_2D, get_editor_theme_icon(SNAME("Polygon2D")));
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 168a3b3ac2..f29ace1d15 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -498,9 +498,9 @@ void SpriteFramesEditor::_toggle_show_settings() {
void SpriteFramesEditor::_update_show_settings() {
if (is_layout_rtl()) {
- toggle_settings_button->set_icon(get_editor_theme_icon(split_sheet_settings_vb->is_visible() ? SNAME("Back") : SNAME("Forward")));
+ toggle_settings_button->set_button_icon(get_editor_theme_icon(split_sheet_settings_vb->is_visible() ? SNAME("Back") : SNAME("Forward")));
} else {
- toggle_settings_button->set_icon(get_editor_theme_icon(split_sheet_settings_vb->is_visible() ? SNAME("Forward") : SNAME("Back")));
+ toggle_settings_button->set_button_icon(get_editor_theme_icon(split_sheet_settings_vb->is_visible() ? SNAME("Forward") : SNAME("Back")));
}
}
@@ -639,32 +639,32 @@ void SpriteFramesEditor::_notification(int p_what) {
pause_icon = get_editor_theme_icon(SNAME("Pause"));
_update_stop_icon();
- autoplay->set_icon(get_editor_theme_icon(SNAME("AutoPlay")));
- anim_loop->set_icon(get_editor_theme_icon(SNAME("Loop")));
- play->set_icon(get_editor_theme_icon(SNAME("PlayStart")));
- play_from->set_icon(get_editor_theme_icon(SNAME("Play")));
- play_bw->set_icon(get_editor_theme_icon(SNAME("PlayStartBackwards")));
- play_bw_from->set_icon(get_editor_theme_icon(SNAME("PlayBackwards")));
-
- load->set_icon(get_editor_theme_icon(SNAME("Load")));
- load_sheet->set_icon(get_editor_theme_icon(SNAME("SpriteSheet")));
- copy->set_icon(get_editor_theme_icon(SNAME("ActionCopy")));
- paste->set_icon(get_editor_theme_icon(SNAME("ActionPaste")));
- empty_before->set_icon(get_editor_theme_icon(SNAME("InsertBefore")));
- empty_after->set_icon(get_editor_theme_icon(SNAME("InsertAfter")));
- move_up->set_icon(get_editor_theme_icon(SNAME("MoveLeft")));
- move_down->set_icon(get_editor_theme_icon(SNAME("MoveRight")));
- delete_frame->set_icon(get_editor_theme_icon(SNAME("Remove")));
- zoom_out->set_icon(get_editor_theme_icon(SNAME("ZoomLess")));
- zoom_reset->set_icon(get_editor_theme_icon(SNAME("ZoomReset")));
- zoom_in->set_icon(get_editor_theme_icon(SNAME("ZoomMore")));
- add_anim->set_icon(get_editor_theme_icon(SNAME("New")));
- duplicate_anim->set_icon(get_editor_theme_icon(SNAME("Duplicate")));
- delete_anim->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ autoplay->set_button_icon(get_editor_theme_icon(SNAME("AutoPlay")));
+ anim_loop->set_button_icon(get_editor_theme_icon(SNAME("Loop")));
+ play->set_button_icon(get_editor_theme_icon(SNAME("PlayStart")));
+ play_from->set_button_icon(get_editor_theme_icon(SNAME("Play")));
+ play_bw->set_button_icon(get_editor_theme_icon(SNAME("PlayStartBackwards")));
+ play_bw_from->set_button_icon(get_editor_theme_icon(SNAME("PlayBackwards")));
+
+ load->set_button_icon(get_editor_theme_icon(SNAME("Load")));
+ load_sheet->set_button_icon(get_editor_theme_icon(SNAME("SpriteSheet")));
+ copy->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
+ paste->set_button_icon(get_editor_theme_icon(SNAME("ActionPaste")));
+ empty_before->set_button_icon(get_editor_theme_icon(SNAME("InsertBefore")));
+ empty_after->set_button_icon(get_editor_theme_icon(SNAME("InsertAfter")));
+ move_up->set_button_icon(get_editor_theme_icon(SNAME("MoveLeft")));
+ move_down->set_button_icon(get_editor_theme_icon(SNAME("MoveRight")));
+ delete_frame->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
+ zoom_out->set_button_icon(get_editor_theme_icon(SNAME("ZoomLess")));
+ zoom_reset->set_button_icon(get_editor_theme_icon(SNAME("ZoomReset")));
+ zoom_in->set_button_icon(get_editor_theme_icon(SNAME("ZoomMore")));
+ add_anim->set_button_icon(get_editor_theme_icon(SNAME("New")));
+ duplicate_anim->set_button_icon(get_editor_theme_icon(SNAME("Duplicate")));
+ delete_anim->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
anim_search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- split_sheet_zoom_out->set_icon(get_editor_theme_icon(SNAME("ZoomLess")));
- split_sheet_zoom_reset->set_icon(get_editor_theme_icon(SNAME("ZoomReset")));
- split_sheet_zoom_in->set_icon(get_editor_theme_icon(SNAME("ZoomMore")));
+ split_sheet_zoom_out->set_button_icon(get_editor_theme_icon(SNAME("ZoomLess")));
+ split_sheet_zoom_reset->set_button_icon(get_editor_theme_icon(SNAME("ZoomReset")));
+ split_sheet_zoom_in->set_button_icon(get_editor_theme_icon(SNAME("ZoomMore")));
split_sheet_scroll->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
_update_show_settings();
@@ -1740,9 +1740,9 @@ void SpriteFramesEditor::_update_stop_icon() {
is_playing = animated_sprite->call("is_playing");
}
if (is_playing) {
- stop->set_icon(pause_icon);
+ stop->set_button_icon(pause_icon);
} else {
- stop->set_icon(stop_icon);
+ stop->set_button_icon(stop_icon);
}
}
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index 0b53c10fab..2d71c617de 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -58,7 +58,7 @@ void StyleBoxPreview::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
set_texture(get_editor_theme_icon(SNAME("Checkerboard")));
- grid_preview->set_icon(get_editor_theme_icon(SNAME("StyleBoxGrid")));
+ grid_preview->set_button_icon(get_editor_theme_icon(SNAME("StyleBoxGrid")));
} break;
case NOTIFICATION_DRAW: {
_redraw();
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index a812633480..bd653e4eed 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -845,9 +845,9 @@ void TextureRegionEditor::_notification(int p_what) {
texture_preview->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("TextureRegionPreviewBG"), EditorStringName(EditorStyles)));
texture_overlay->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("TextureRegionPreviewFG"), EditorStringName(EditorStyles)));
- zoom_out->set_icon(get_editor_theme_icon(SNAME("ZoomLess")));
- zoom_reset->set_icon(get_editor_theme_icon(SNAME("ZoomReset")));
- zoom_in->set_icon(get_editor_theme_icon(SNAME("ZoomMore")));
+ zoom_out->set_button_icon(get_editor_theme_icon(SNAME("ZoomLess")));
+ zoom_reset->set_button_icon(get_editor_theme_icon(SNAME("ZoomReset")));
+ zoom_in->set_button_icon(get_editor_theme_icon(SNAME("ZoomMore")));
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
@@ -1270,7 +1270,7 @@ bool EditorInspectorPluginTextureRegion::parse_property(Object *p_object, const
if ((p_type == Variant::RECT2 || p_type == Variant::RECT2I)) {
if (((Object::cast_to<Sprite2D>(p_object) || Object::cast_to<Sprite3D>(p_object) || Object::cast_to<NinePatchRect>(p_object) || Object::cast_to<StyleBoxTexture>(p_object)) && p_path == "region_rect") || (Object::cast_to<AtlasTexture>(p_object) && p_path == "region")) {
Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Region"));
- button->set_icon(texture_region_editor->get_editor_theme_icon(SNAME("RegionEdit")));
+ button->set_button_icon(texture_region_editor->get_editor_theme_icon(SNAME("RegionEdit")));
button->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorPluginTextureRegion::_region_edit).bind(p_object));
add_property_editor(p_path, button, true);
}
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index cc488ff340..de75ed8c12 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -861,43 +861,43 @@ void ThemeItemImportTree::_notification(int p_what) {
import_items_filter->set_right_icon(get_editor_theme_icon(SNAME("Search")));
// Bottom panel buttons.
- import_collapse_types_button->set_icon(get_editor_theme_icon(SNAME("CollapseTree")));
- import_expand_types_button->set_icon(get_editor_theme_icon(SNAME("ExpandTree")));
+ import_collapse_types_button->set_button_icon(get_editor_theme_icon(SNAME("CollapseTree")));
+ import_expand_types_button->set_button_icon(get_editor_theme_icon(SNAME("ExpandTree")));
- import_select_all_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- import_select_full_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
- import_deselect_all_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ import_select_all_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ import_select_full_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ import_deselect_all_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
// Side panel buttons.
select_colors_icon->set_texture(get_editor_theme_icon(SNAME("Color")));
- deselect_all_colors_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
- select_all_colors_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- select_full_colors_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ deselect_all_colors_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ select_all_colors_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ select_full_colors_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
select_constants_icon->set_texture(get_editor_theme_icon(SNAME("MemberConstant")));
- deselect_all_constants_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
- select_all_constants_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- select_full_constants_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ deselect_all_constants_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ select_all_constants_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ select_full_constants_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
select_fonts_icon->set_texture(get_editor_theme_icon(SNAME("FontItem")));
- deselect_all_fonts_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
- select_all_fonts_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- select_full_fonts_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ deselect_all_fonts_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ select_all_fonts_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ select_full_fonts_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
select_font_sizes_icon->set_texture(get_editor_theme_icon(SNAME("FontSize")));
- deselect_all_font_sizes_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
- select_all_font_sizes_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- select_full_font_sizes_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ deselect_all_font_sizes_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ select_all_font_sizes_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ select_full_font_sizes_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
select_icons_icon->set_texture(get_editor_theme_icon(SNAME("ImageTexture")));
- deselect_all_icons_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
- select_all_icons_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- select_full_icons_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ deselect_all_icons_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ select_all_icons_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ select_full_icons_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
select_styleboxes_icon->set_texture(get_editor_theme_icon(SNAME("StyleBoxFlat")));
- deselect_all_styleboxes_button->set_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
- select_all_styleboxes_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
- select_full_styleboxes_button->set_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
+ deselect_all_styleboxes_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeDeselectAll")));
+ select_all_styleboxes_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectAll")));
+ select_full_styleboxes_button->set_button_icon(get_editor_theme_icon(SNAME("ThemeSelectFull")));
} break;
}
}
@@ -1877,20 +1877,20 @@ void ThemeItemEditorDialog::_notification(int p_what) {
[[fallthrough]];
}
case NOTIFICATION_THEME_CHANGED: {
- edit_items_add_color->set_icon(get_editor_theme_icon(SNAME("Color")));
- edit_items_add_constant->set_icon(get_editor_theme_icon(SNAME("MemberConstant")));
- edit_items_add_font->set_icon(get_editor_theme_icon(SNAME("FontItem")));
- edit_items_add_font_size->set_icon(get_editor_theme_icon(SNAME("FontSize")));
- edit_items_add_icon->set_icon(get_editor_theme_icon(SNAME("ImageTexture")));
- edit_items_add_stylebox->set_icon(get_editor_theme_icon(SNAME("StyleBoxFlat")));
+ edit_items_add_color->set_button_icon(get_editor_theme_icon(SNAME("Color")));
+ edit_items_add_constant->set_button_icon(get_editor_theme_icon(SNAME("MemberConstant")));
+ edit_items_add_font->set_button_icon(get_editor_theme_icon(SNAME("FontItem")));
+ edit_items_add_font_size->set_button_icon(get_editor_theme_icon(SNAME("FontSize")));
+ edit_items_add_icon->set_button_icon(get_editor_theme_icon(SNAME("ImageTexture")));
+ edit_items_add_stylebox->set_button_icon(get_editor_theme_icon(SNAME("StyleBoxFlat")));
- edit_items_remove_class->set_icon(get_editor_theme_icon(SNAME("Control")));
- edit_items_remove_custom->set_icon(get_editor_theme_icon(SNAME("ThemeRemoveCustomItems")));
- edit_items_remove_all->set_icon(get_editor_theme_icon(SNAME("ThemeRemoveAllItems")));
+ edit_items_remove_class->set_button_icon(get_editor_theme_icon(SNAME("Control")));
+ edit_items_remove_custom->set_button_icon(get_editor_theme_icon(SNAME("ThemeRemoveCustomItems")));
+ edit_items_remove_all->set_button_icon(get_editor_theme_icon(SNAME("ThemeRemoveAllItems")));
- edit_add_type_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ edit_add_type_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
- import_another_theme_button->set_icon(get_editor_theme_icon(SNAME("Folder")));
+ import_another_theme_button->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
} break;
}
}
@@ -2481,21 +2481,21 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_name_edit->hide();
Button *item_rename_button = memnew(Button);
- item_rename_button->set_icon(get_editor_theme_icon(SNAME("Edit")));
+ item_rename_button->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
item_rename_button->set_tooltip_text(TTR("Rename Item"));
item_rename_button->set_flat(true);
item_name_container->add_child(item_rename_button);
item_rename_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_rename_cbk).bind(p_data_type, p_item_name, item_name_container));
Button *item_remove_button = memnew(Button);
- item_remove_button->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ item_remove_button->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
item_remove_button->set_tooltip_text(TTR("Remove Item"));
item_remove_button->set_flat(true);
item_name_container->add_child(item_remove_button);
item_remove_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_item_remove_cbk).bind(p_data_type, p_item_name));
Button *item_rename_confirm_button = memnew(Button);
- item_rename_confirm_button->set_icon(get_editor_theme_icon(SNAME("ImportCheck")));
+ item_rename_confirm_button->set_button_icon(get_editor_theme_icon(SNAME("ImportCheck")));
item_rename_confirm_button->set_tooltip_text(TTR("Confirm Item Rename"));
item_rename_confirm_button->set_flat(true);
item_name_container->add_child(item_rename_confirm_button);
@@ -2503,7 +2503,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_rename_confirm_button->hide();
Button *item_rename_cancel_button = memnew(Button);
- item_rename_cancel_button->set_icon(get_editor_theme_icon(SNAME("ImportFail")));
+ item_rename_cancel_button->set_button_icon(get_editor_theme_icon(SNAME("ImportFail")));
item_rename_cancel_button->set_tooltip_text(TTR("Cancel Item Rename"));
item_rename_cancel_button->set_flat(true);
item_name_container->add_child(item_rename_cancel_button);
@@ -2513,7 +2513,7 @@ HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_
item_name->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("font_disabled_color"), EditorStringName(Editor)));
Button *item_override_button = memnew(Button);
- item_override_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ item_override_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
item_override_button->set_tooltip_text(TTR("Override Item"));
item_override_button->set_flat(true);
item_name_container->add_child(item_override_button);
@@ -2722,7 +2722,7 @@ void ThemeTypeEditor::_update_type_items() {
pin_leader_button->set_flat(true);
pin_leader_button->set_toggle_mode(true);
pin_leader_button->set_pressed(true);
- pin_leader_button->set_icon(get_editor_theme_icon(SNAME("Pin")));
+ pin_leader_button->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
pin_leader_button->set_tooltip_text(TTR("Unpin this StyleBox as a main style."));
item_control->add_child(pin_leader_button);
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_unpin_leader_button_pressed));
@@ -2765,7 +2765,7 @@ void ThemeTypeEditor::_update_type_items() {
Button *pin_leader_button = memnew(Button);
pin_leader_button->set_flat(true);
pin_leader_button->set_toggle_mode(true);
- pin_leader_button->set_icon(get_editor_theme_icon(SNAME("Pin")));
+ pin_leader_button->set_button_icon(get_editor_theme_icon(SNAME("Pin")));
pin_leader_button->set_tooltip_text(TTR("Pin this StyleBox as a main style. Editing its properties will update the same properties in all other StyleBoxes of this type."));
item_control->add_child(pin_leader_button);
pin_leader_button->connect(SceneStringName(pressed), callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
@@ -3371,7 +3371,7 @@ void ThemeTypeEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- add_type_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ add_type_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
data_type_tabs->set_tab_icon(0, get_editor_theme_icon(SNAME("Color")));
data_type_tabs->set_tab_icon(1, get_editor_theme_icon(SNAME("MemberConstant")));
@@ -3381,7 +3381,7 @@ void ThemeTypeEditor::_notification(int p_what) {
data_type_tabs->set_tab_icon(5, get_editor_theme_icon(SNAME("StyleBoxFlat")));
data_type_tabs->set_tab_icon(6, get_editor_theme_icon(SNAME("Tools")));
- type_variation_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ type_variation_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
}
}
@@ -3695,7 +3695,7 @@ void ThemeEditor::_notification(int p_what) {
preview_tabs->add_theme_style_override("tab_unselected", get_theme_stylebox(SNAME("ThemeEditorPreviewBG"), EditorStringName(EditorStyles)));
preview_tabs_content->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("TabContainerOdd")));
- add_preview_button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ add_preview_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
}
}
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index 2426cec521..ea5e8a8ad7 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -211,7 +211,7 @@ void ThemeEditorPreview::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- picker_button->set_icon(get_editor_theme_icon(SNAME("ColorPick")));
+ picker_button->set_button_icon(get_editor_theme_icon(SNAME("ColorPick")));
theme_cache.preview_picker_overlay = get_theme_stylebox(SNAME("preview_picker_overlay"), SNAME("ThemeEditor"));
theme_cache.preview_picker_overlay_color = get_theme_color(SNAME("preview_picker_overlay_color"), SNAME("ThemeEditor"));
@@ -489,7 +489,7 @@ void SceneThemeEditorPreview::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- reload_scene_button->set_icon(get_editor_theme_icon(SNAME("Reload")));
+ reload_scene_button->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
} break;
}
}
diff --git a/editor/plugins/tiles/tile_atlas_view.cpp b/editor/plugins/tiles/tile_atlas_view.cpp
index e9f920b438..bafacf8e36 100644
--- a/editor/plugins/tiles/tile_atlas_view.cpp
+++ b/editor/plugins/tiles/tile_atlas_view.cpp
@@ -618,7 +618,7 @@ void TileAtlasView::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- button_center_view->set_icon(theme_cache.center_view_icon);
+ button_center_view->set_button_icon(theme_cache.center_view_icon);
} break;
}
}
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index 3a4af941d4..bf53a9dfba 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -722,7 +722,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
void GenericTilePolygonEditor::_set_snap_option(int p_index) {
current_snap_option = p_index;
- button_pixel_snap->set_icon(button_pixel_snap->get_popup()->get_item_icon(p_index));
+ button_pixel_snap->set_button_icon(button_pixel_snap->get_popup()->get_item_icon(p_index));
snap_subdivision->set_visible(p_index == SNAP_GRID);
if (initializing) {
@@ -880,16 +880,16 @@ void GenericTilePolygonEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- button_expand->set_icon(get_editor_theme_icon(SNAME("DistractionFree")));
- button_create->set_icon(get_editor_theme_icon(SNAME("CurveCreate")));
- button_edit->set_icon(get_editor_theme_icon(SNAME("CurveEdit")));
- button_delete->set_icon(get_editor_theme_icon(SNAME("CurveDelete")));
- button_center_view->set_icon(get_editor_theme_icon(SNAME("CenterView")));
- button_advanced_menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ button_expand->set_button_icon(get_editor_theme_icon(SNAME("DistractionFree")));
+ button_create->set_button_icon(get_editor_theme_icon(SNAME("CurveCreate")));
+ button_edit->set_button_icon(get_editor_theme_icon(SNAME("CurveEdit")));
+ button_delete->set_button_icon(get_editor_theme_icon(SNAME("CurveDelete")));
+ button_center_view->set_button_icon(get_editor_theme_icon(SNAME("CenterView")));
+ button_advanced_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
button_pixel_snap->get_popup()->set_item_icon(0, get_editor_theme_icon(SNAME("SnapDisable")));
button_pixel_snap->get_popup()->set_item_icon(1, get_editor_theme_icon(SNAME("Snap")));
button_pixel_snap->get_popup()->set_item_icon(2, get_editor_theme_icon(SNAME("SnapGrid")));
- button_pixel_snap->set_icon(button_pixel_snap->get_popup()->get_item_icon(current_snap_option));
+ button_pixel_snap->set_button_icon(button_pixel_snap->get_popup()->get_item_icon(current_snap_option));
PopupMenu *p = button_advanced_menu->get_popup();
p->set_item_icon(p->get_item_index(ROTATE_RIGHT), get_editor_theme_icon(SNAME("RotateRight")));
@@ -1361,7 +1361,7 @@ void TileDataDefaultEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- picker_button->set_icon(get_editor_theme_icon(SNAME("ColorPick")));
+ picker_button->set_button_icon(get_editor_theme_icon(SNAME("ColorPick")));
tile_bool_checked = get_editor_theme_icon(SNAME("TileChecked"));
tile_bool_unchecked = get_editor_theme_icon(SNAME("TileUnchecked"));
} break;
@@ -2867,7 +2867,7 @@ void TileDataTerrainsEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE:
case NOTIFICATION_THEME_CHANGED: {
- picker_button->set_icon(get_editor_theme_icon(SNAME("ColorPick")));
+ picker_button->set_button_icon(get_editor_theme_icon(SNAME("ColorPick")));
} break;
}
}
diff --git a/editor/plugins/tiles/tile_map_layer_editor.cpp b/editor/plugins/tiles/tile_map_layer_editor.cpp
index dcfd92f6f9..804db68f86 100644
--- a/editor/plugins/tiles/tile_map_layer_editor.cpp
+++ b/editor/plugins/tiles/tile_map_layer_editor.cpp
@@ -503,21 +503,21 @@ void TileMapLayerEditorTilesPlugin::_scenes_list_lmb_empty_clicked(const Vector2
}
void TileMapLayerEditorTilesPlugin::_update_theme() {
- source_sort_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Sort")));
- select_tool_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("ToolSelect")));
- paint_tool_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Edit")));
- line_tool_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Line")));
- rect_tool_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Rectangle")));
- bucket_tool_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Bucket")));
-
- picker_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("ColorPick")));
- erase_button->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Eraser")));
- random_tile_toggle->set_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("RandomNumberGenerator")));
-
- transform_button_rotate_left->set_icon(tiles_bottom_panel->get_editor_theme_icon("RotateLeft"));
- transform_button_rotate_right->set_icon(tiles_bottom_panel->get_editor_theme_icon("RotateRight"));
- transform_button_flip_h->set_icon(tiles_bottom_panel->get_editor_theme_icon("MirrorX"));
- transform_button_flip_v->set_icon(tiles_bottom_panel->get_editor_theme_icon("MirrorY"));
+ source_sort_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Sort")));
+ select_tool_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("ToolSelect")));
+ paint_tool_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Edit")));
+ line_tool_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Line")));
+ rect_tool_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Rectangle")));
+ bucket_tool_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Bucket")));
+
+ picker_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("ColorPick")));
+ erase_button->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("Eraser")));
+ random_tile_toggle->set_button_icon(tiles_bottom_panel->get_editor_theme_icon(SNAME("RandomNumberGenerator")));
+
+ transform_button_rotate_left->set_button_icon(tiles_bottom_panel->get_editor_theme_icon("RotateLeft"));
+ transform_button_rotate_right->set_button_icon(tiles_bottom_panel->get_editor_theme_icon("RotateRight"));
+ transform_button_flip_h->set_button_icon(tiles_bottom_panel->get_editor_theme_icon("MirrorX"));
+ transform_button_flip_v->set_button_icon(tiles_bottom_panel->get_editor_theme_icon("MirrorY"));
missing_atlas_texture_icon = tiles_bottom_panel->get_editor_theme_icon(SNAME("TileSet"));
_update_tile_set_sources_list();
@@ -3486,13 +3486,13 @@ void TileMapLayerEditorTerrainsPlugin::_update_tiles_list() {
}
void TileMapLayerEditorTerrainsPlugin::_update_theme() {
- paint_tool_button->set_icon(main_vbox_container->get_editor_theme_icon(SNAME("Edit")));
- line_tool_button->set_icon(main_vbox_container->get_editor_theme_icon(SNAME("Line")));
- rect_tool_button->set_icon(main_vbox_container->get_editor_theme_icon(SNAME("Rectangle")));
- bucket_tool_button->set_icon(main_vbox_container->get_editor_theme_icon(SNAME("Bucket")));
+ paint_tool_button->set_button_icon(main_vbox_container->get_editor_theme_icon(SNAME("Edit")));
+ line_tool_button->set_button_icon(main_vbox_container->get_editor_theme_icon(SNAME("Line")));
+ rect_tool_button->set_button_icon(main_vbox_container->get_editor_theme_icon(SNAME("Rectangle")));
+ bucket_tool_button->set_button_icon(main_vbox_container->get_editor_theme_icon(SNAME("Bucket")));
- picker_button->set_icon(main_vbox_container->get_editor_theme_icon(SNAME("ColorPick")));
- erase_button->set_icon(main_vbox_container->get_editor_theme_icon(SNAME("Eraser")));
+ picker_button->set_button_icon(main_vbox_container->get_editor_theme_icon(SNAME("ColorPick")));
+ erase_button->set_button_icon(main_vbox_container->get_editor_theme_icon(SNAME("Eraser")));
_update_tiles_list();
}
@@ -3689,12 +3689,12 @@ void TileMapLayerEditor::_notification(int p_what) {
case NOTIFICATION_THEME_CHANGED: {
missing_tile_texture = get_editor_theme_icon(SNAME("StatusWarning"));
warning_pattern_texture = get_editor_theme_icon(SNAME("WarningPattern"));
- advanced_menu_button->set_icon(get_editor_theme_icon(SNAME("Tools")));
- select_previous_layer->set_icon(get_editor_theme_icon(SNAME("MoveUp")));
- select_next_layer->set_icon(get_editor_theme_icon(SNAME("MoveDown")));
- select_all_layers->set_icon(get_editor_theme_icon(SNAME("FileList")));
- toggle_grid_button->set_icon(get_editor_theme_icon(SNAME("Grid")));
- toggle_highlight_selected_layer_button->set_icon(get_editor_theme_icon(SNAME("TileMapHighlightSelected")));
+ advanced_menu_button->set_button_icon(get_editor_theme_icon(SNAME("Tools")));
+ select_previous_layer->set_button_icon(get_editor_theme_icon(SNAME("MoveUp")));
+ select_next_layer->set_button_icon(get_editor_theme_icon(SNAME("MoveDown")));
+ select_all_layers->set_button_icon(get_editor_theme_icon(SNAME("FileList")));
+ toggle_grid_button->set_button_icon(get_editor_theme_icon(SNAME("Grid")));
+ toggle_highlight_selected_layer_button->set_button_icon(get_editor_theme_icon(SNAME("TileMapHighlightSelected")));
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index b1417b2878..34e24c1424 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -996,7 +996,7 @@ void TileSetAtlasSourceEditor::_update_atlas_view() {
// Create and position the button.
Button *button = memnew(Button);
button->set_flat(true);
- button->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
button->add_theme_style_override(CoreStringName(normal), memnew(StyleBoxEmpty));
button->add_theme_style_override("hover", memnew(StyleBoxEmpty));
button->add_theme_style_override("focus", memnew(StyleBoxEmpty));
@@ -2441,12 +2441,12 @@ void TileSetAtlasSourceEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- tool_setup_atlas_source_button->set_icon(get_editor_theme_icon(SNAME("Tools")));
- tool_select_button->set_icon(get_editor_theme_icon(SNAME("ToolSelect")));
- tool_paint_button->set_icon(get_editor_theme_icon(SNAME("Paint")));
+ tool_setup_atlas_source_button->set_button_icon(get_editor_theme_icon(SNAME("Tools")));
+ tool_select_button->set_button_icon(get_editor_theme_icon(SNAME("ToolSelect")));
+ tool_paint_button->set_button_icon(get_editor_theme_icon(SNAME("Paint")));
- tools_settings_erase_button->set_icon(get_editor_theme_icon(SNAME("Eraser")));
- tool_advanced_menu_button->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ tools_settings_erase_button->set_button_icon(get_editor_theme_icon(SNAME("Eraser")));
+ tool_advanced_menu_button->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
outside_tiles_warning->set_texture(get_editor_theme_icon(SNAME("StatusWarning")));
resize_handle = get_editor_theme_icon(SNAME("EditorHandle"));
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index 7e5336ce06..6f473d1b60 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -366,10 +366,10 @@ void TileSetEditor::_set_source_sort(int p_sort) {
void TileSetEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- sources_delete_button->set_icon(get_editor_theme_icon(SNAME("Remove")));
- sources_add_button->set_icon(get_editor_theme_icon(SNAME("Add")));
- source_sort_button->set_icon(get_editor_theme_icon(SNAME("Sort")));
- sources_advanced_menu_button->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ sources_delete_button->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
+ sources_add_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ source_sort_button->set_button_icon(get_editor_theme_icon(SNAME("Sort")));
+ sources_advanced_menu_button->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
missing_texture_texture = get_editor_theme_icon(SNAME("TileSet"));
expanded_area->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), "Tree"));
_update_sources_list();
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
index 305407efdb..e2b3c451b0 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -367,8 +367,8 @@ void TileSetScenesCollectionSourceEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- scene_tile_add_button->set_icon(get_editor_theme_icon(SNAME("Add")));
- scene_tile_delete_button->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ scene_tile_add_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ scene_tile_delete_button->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
_update_scenes_list();
} break;
diff --git a/editor/plugins/tool_button_editor_plugin.cpp b/editor/plugins/tool_button_editor_plugin.cpp
index d9852c8694..d9a15d9a23 100644
--- a/editor/plugins/tool_button_editor_plugin.cpp
+++ b/editor/plugins/tool_button_editor_plugin.cpp
@@ -33,7 +33,7 @@
#include "scene/gui/button.h"
void EditorInspectorToolButtonPlugin::_update_action_icon(Button *p_action_button, const String &p_action_icon) {
- p_action_button->set_icon(p_action_button->get_editor_theme_icon(p_action_icon));
+ p_action_button->set_button_icon(p_action_button->get_editor_theme_icon(p_action_icon));
}
void EditorInspectorToolButtonPlugin::_call_action(const Variant &p_object, const StringName &p_property) {
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index 4f0df1d5fc..815664c608 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -1081,7 +1081,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_ssh_public_key_input_hbc->add_child(set_up_ssh_public_key_file_dialog);
Button *select_public_path_button = memnew(Button);
- select_public_path_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
+ select_public_path_button->set_button_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
select_public_path_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(set_up_ssh_public_key_file_dialog));
select_public_path_button->set_tooltip_text(TTR("Select SSH public key path"));
set_up_ssh_public_key_input_hbc->add_child(select_public_path_button);
@@ -1114,7 +1114,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_ssh_private_key_input_hbc->add_child(set_up_ssh_private_key_file_dialog);
Button *select_private_path_button = memnew(Button);
- select_private_path_button->set_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
+ select_private_path_button->set_button_icon(EditorNode::get_singleton()->get_gui_base()->get_editor_theme_icon("Folder"));
select_private_path_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_file_dialog).bind(set_up_ssh_private_key_file_dialog));
select_private_path_button->set_tooltip_text(TTR("Select SSH private key path"));
set_up_ssh_private_key_input_hbc->add_child(select_private_path_button);
@@ -1159,7 +1159,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
refresh_button = memnew(Button);
refresh_button->set_tooltip_text(TTR("Detect new changes"));
refresh_button->set_theme_type_variation("FlatButton");
- refresh_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
+ refresh_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
refresh_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_stage_area));
refresh_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_commit_list));
refresh_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_refresh_branch_list));
@@ -1179,14 +1179,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
discard_all_button = memnew(Button);
discard_all_button->set_tooltip_text(TTR("Discard all changes"));
- discard_all_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Close"), EditorStringName(EditorIcons)));
+ discard_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Close"), EditorStringName(EditorIcons)));
discard_all_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_confirm_discard_all));
discard_all_button->set_theme_type_variation("FlatButton");
unstage_title->add_child(discard_all_button);
stage_all_button = memnew(Button);
stage_all_button->set_theme_type_variation("FlatButton");
- stage_all_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
+ stage_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
stage_all_button->set_tooltip_text(TTR("Stage all changes"));
unstage_title->add_child(stage_all_button);
@@ -1216,7 +1216,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
unstage_all_button = memnew(Button);
unstage_all_button->set_theme_type_variation("FlatButton");
- unstage_all_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
+ unstage_all_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
unstage_all_button->set_tooltip_text(TTR("Unstage all changes"));
stage_title->add_child(unstage_all_button);
@@ -1411,26 +1411,26 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
fetch_button = memnew(Button);
fetch_button->set_theme_type_variation("FlatButton");
fetch_button->set_tooltip_text(TTR("Fetch"));
- fetch_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
+ fetch_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
fetch_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_fetch));
menu_bar->add_child(fetch_button);
pull_button = memnew(Button);
pull_button->set_theme_type_variation("FlatButton");
pull_button->set_tooltip_text(TTR("Pull"));
- pull_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
+ pull_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveDown"), EditorStringName(EditorIcons)));
pull_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_pull));
menu_bar->add_child(pull_button);
push_button = memnew(Button);
push_button->set_theme_type_variation("FlatButton");
push_button->set_tooltip_text(TTR("Push"));
- push_button->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
+ push_button->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MoveUp"), EditorStringName(EditorIcons)));
push_button->connect(SceneStringName(pressed), callable_mp(this, &VersionControlEditorPlugin::_push));
menu_bar->add_child(push_button);
extra_options = memnew(MenuButton);
- extra_options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GuiTabMenuHl"), EditorStringName(EditorIcons)));
+ extra_options->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GuiTabMenuHl"), EditorStringName(EditorIcons)));
extra_options->get_popup()->connect(SNAME("about_to_popup"), callable_mp(this, &VersionControlEditorPlugin::_update_extra_options));
extra_options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
menu_bar->add_child(extra_options);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index a5df9edcf0..58a4cdda5d 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1138,7 +1138,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
name_box->connect(SceneStringName(focus_exited), callable_mp(editor, &VisualShaderEditor::_port_name_focus_out).bind(name_box, p_id, j, false), CONNECT_DEFERRED);
Button *remove_btn = memnew(Button);
- remove_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
+ remove_btn->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
remove_btn->set_tooltip_text(TTR("Remove") + " " + name_left);
remove_btn->connect(SceneStringName(pressed), callable_mp(editor, &VisualShaderEditor::_remove_input_port).bind(p_id, j), CONNECT_DEFERRED);
hb->add_child(remove_btn);
@@ -1166,7 +1166,7 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id, bool
if (valid_right) {
if (is_group) {
Button *remove_btn = memnew(Button);
- remove_btn->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
+ remove_btn->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
remove_btn->set_tooltip_text(TTR("Remove") + " " + name_left);
remove_btn->connect(SceneStringName(pressed), callable_mp(editor, &VisualShaderEditor::_remove_output_port).bind(p_id, i), CONNECT_DEFERRED);
hb->add_child(remove_btn);
@@ -5106,8 +5106,8 @@ void VisualShaderEditor::_notification(int p_what) {
param_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search")));
node_filter->set_right_icon(Control::get_editor_theme_icon(SNAME("Search")));
- code_preview_button->set_icon(Control::get_editor_theme_icon(SNAME("Shader")));
- shader_preview_button->set_icon(Control::get_editor_theme_icon(SNAME("SubViewport")));
+ code_preview_button->set_button_icon(Control::get_editor_theme_icon(SNAME("Shader")));
+ shader_preview_button->set_button_icon(Control::get_editor_theme_icon(SNAME("SubViewport")));
{
Color background_color = EDITOR_GET("text_editor/theme/highlighting/background_color");
@@ -5158,7 +5158,7 @@ void VisualShaderEditor::_notification(int p_what) {
error_label->end_bulk_theme_override();
}
- tools->set_icon(get_editor_theme_icon(SNAME("Tools")));
+ tools->set_button_icon(get_editor_theme_icon(SNAME("Tools")));
if (is_visible_in_tree()) {
_update_graph();
diff --git a/editor/plugins/voxel_gi_editor_plugin.cpp b/editor/plugins/voxel_gi_editor_plugin.cpp
index 3e835d5cb6..68fe013c08 100644
--- a/editor/plugins/voxel_gi_editor_plugin.cpp
+++ b/editor/plugins/voxel_gi_editor_plugin.cpp
@@ -185,7 +185,7 @@ VoxelGIEditorPlugin::VoxelGIEditorPlugin() {
bake->set_theme_type_variation("FlatButton");
// TODO: Rework this as a dedicated toolbar control so we can hook into theme changes and update it
// when the editor theme updates.
- bake->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
+ bake->set_button_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
bake->set_text(TTR("Bake VoxelGI"));
bake->connect(SceneStringName(pressed), callable_mp(this, &VoxelGIEditorPlugin::_bake));
bake_hb->add_child(bake);
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 30878a2488..30cf2030bc 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -224,7 +224,7 @@ void ProjectManager::_update_theme(bool p_skip_creation) {
background_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("Background"), EditorStringName(EditorStyles)));
main_view_container->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("TabContainer")));
- title_bar_logo->set_icon(get_editor_theme_icon(SNAME("TitleBarLogo")));
+ title_bar_logo->set_button_icon(get_editor_theme_icon(SNAME("TitleBarLogo")));
_set_main_view_icon(MAIN_VIEW_PROJECTS, get_editor_theme_icon(SNAME("ProjectList")));
_set_main_view_icon(MAIN_VIEW_ASSETLIB, get_editor_theme_icon(SNAME("AssetLib")));
@@ -234,28 +234,28 @@ void ProjectManager::_update_theme(bool p_skip_creation) {
loading_label->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("bold"), EditorStringName(EditorFonts)));
project_list_panel->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("project_list"), SNAME("ProjectManager")));
- empty_list_create_project->set_icon(get_editor_theme_icon(SNAME("Add")));
- empty_list_import_project->set_icon(get_editor_theme_icon(SNAME("Load")));
- empty_list_open_assetlib->set_icon(get_editor_theme_icon(SNAME("AssetLib")));
+ empty_list_create_project->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ empty_list_import_project->set_button_icon(get_editor_theme_icon(SNAME("Load")));
+ empty_list_open_assetlib->set_button_icon(get_editor_theme_icon(SNAME("AssetLib")));
empty_list_online_warning->add_theme_font_override(SceneStringName(font), get_theme_font(SNAME("italic"), EditorStringName(EditorFonts)));
empty_list_online_warning->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("font_placeholder_color"), EditorStringName(Editor)));
// Top bar.
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- quick_settings_button->set_icon(get_editor_theme_icon(SNAME("Tools")));
+ quick_settings_button->set_button_icon(get_editor_theme_icon(SNAME("Tools")));
// Sidebar.
- create_btn->set_icon(get_editor_theme_icon(SNAME("Add")));
- import_btn->set_icon(get_editor_theme_icon(SNAME("Load")));
- scan_btn->set_icon(get_editor_theme_icon(SNAME("Search")));
- open_btn->set_icon(get_editor_theme_icon(SNAME("Edit")));
- run_btn->set_icon(get_editor_theme_icon(SNAME("Play")));
- rename_btn->set_icon(get_editor_theme_icon(SNAME("Rename")));
- manage_tags_btn->set_icon(get_editor_theme_icon("Script"));
- erase_btn->set_icon(get_editor_theme_icon(SNAME("Remove")));
- erase_missing_btn->set_icon(get_editor_theme_icon(SNAME("Clear")));
- create_tag_btn->set_icon(get_editor_theme_icon("Add"));
+ create_btn->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ import_btn->set_button_icon(get_editor_theme_icon(SNAME("Load")));
+ scan_btn->set_button_icon(get_editor_theme_icon(SNAME("Search")));
+ open_btn->set_button_icon(get_editor_theme_icon(SNAME("Edit")));
+ run_btn->set_button_icon(get_editor_theme_icon(SNAME("Play")));
+ rename_btn->set_button_icon(get_editor_theme_icon(SNAME("Rename")));
+ manage_tags_btn->set_button_icon(get_editor_theme_icon("Script"));
+ erase_btn->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
+ erase_missing_btn->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
+ create_tag_btn->set_button_icon(get_editor_theme_icon("Add"));
tag_error->add_theme_color_override(SceneStringName(font_color), get_theme_color("error_color", EditorStringName(Editor)));
tag_edit_error->add_theme_color_override(SceneStringName(font_color), get_theme_color("error_color", EditorStringName(Editor)));
@@ -310,17 +310,17 @@ void ProjectManager::_set_main_view_icon(MainViewTab p_id, const Ref<Texture2D>
Button *toggle_button = main_view_toggle_map[p_id];
- Ref<Texture2D> old_icon = toggle_button->get_icon();
+ Ref<Texture2D> old_icon = toggle_button->get_button_icon();
if (old_icon.is_valid()) {
old_icon->disconnect_changed(callable_mp((Control *)toggle_button, &Control::update_minimum_size));
}
if (p_icon.is_valid()) {
- toggle_button->set_icon(p_icon);
+ toggle_button->set_button_icon(p_icon);
// Make sure the control is updated if the icon is reimported.
p_icon->connect_changed(callable_mp((Control *)toggle_button, &Control::update_minimum_size));
} else {
- toggle_button->set_icon(Ref<Texture2D>());
+ toggle_button->set_button_icon(Ref<Texture2D>());
}
}
diff --git a/editor/project_manager/project_dialog.cpp b/editor/project_manager/project_dialog.cpp
index 7aadb9ac3c..8750ae8714 100644
--- a/editor/project_manager/project_dialog.cpp
+++ b/editor/project_manager/project_dialog.cpp
@@ -825,9 +825,9 @@ void ProjectDialog::show_dialog(bool p_reset_name) {
void ProjectDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- create_dir->set_icon(get_editor_theme_icon(SNAME("FolderCreate")));
- project_browse->set_icon(get_editor_theme_icon(SNAME("FolderBrowse")));
- install_browse->set_icon(get_editor_theme_icon(SNAME("FolderBrowse")));
+ create_dir->set_button_icon(get_editor_theme_icon(SNAME("FolderCreate")));
+ project_browse->set_button_icon(get_editor_theme_icon(SNAME("FolderBrowse")));
+ install_browse->set_button_icon(get_editor_theme_icon(SNAME("FolderBrowse")));
} break;
case NOTIFICATION_READY: {
fdialog_project = memnew(EditorFileDialog);
diff --git a/editor/project_manager/project_list.cpp b/editor/project_manager/project_list.cpp
index 39c1a78c4a..27f04c0d0d 100644
--- a/editor/project_manager/project_list.cpp
+++ b/editor/project_manager/project_list.cpp
@@ -67,9 +67,9 @@ void ProjectListItemControl::_notification(int p_what) {
favorite_button->set_texture_normal(get_editor_theme_icon(SNAME("Favorites")));
if (project_is_missing) {
- explore_button->set_icon(get_editor_theme_icon(SNAME("FileBroken")));
+ explore_button->set_button_icon(get_editor_theme_icon(SNAME("FileBroken")));
} else {
- explore_button->set_icon(get_editor_theme_icon(SNAME("Load")));
+ explore_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));
}
} break;
@@ -196,12 +196,12 @@ void ProjectListItemControl::set_is_missing(bool p_missing) {
if (project_is_missing) {
project_icon->set_modulate(Color(1, 1, 1, 0.5));
- explore_button->set_icon(get_editor_theme_icon(SNAME("FileBroken")));
+ explore_button->set_button_icon(get_editor_theme_icon(SNAME("FileBroken")));
explore_button->set_tooltip_text(TTR("Error: Project is missing on the filesystem."));
} else {
project_icon->set_modulate(Color(1, 1, 1, 1.0));
- explore_button->set_icon(get_editor_theme_icon(SNAME("Load")));
+ explore_button->set_button_icon(get_editor_theme_icon(SNAME("Load")));
#if !defined(ANDROID_ENABLED) && !defined(WEB_ENABLED)
explore_button->set_tooltip_text(TTR("Show in File Manager"));
#else
diff --git a/editor/project_manager/project_tag.cpp b/editor/project_manager/project_tag.cpp
index 618b6555d4..e66969333c 100644
--- a/editor/project_manager/project_tag.cpp
+++ b/editor/project_manager/project_tag.cpp
@@ -36,7 +36,7 @@
void ProjectTag::_notification(int p_what) {
if (display_close && p_what == NOTIFICATION_THEME_CHANGED) {
- button->set_icon(get_theme_icon(SNAME("close"), SNAME("TabBar")));
+ button->set_button_icon(get_theme_icon(SNAME("close"), SNAME("TabBar")));
}
}
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index f973367bed..89c18143dc 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -576,10 +576,10 @@ void ProjectSettingsEditor::_update_action_map_editor() {
}
void ProjectSettingsEditor::_update_theme() {
- add_button->set_icon(get_editor_theme_icon(SNAME("Add")));
- del_button->set_icon(get_editor_theme_icon(SNAME("Remove")));
+ add_button->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ del_button->set_button_icon(get_editor_theme_icon(SNAME("Remove")));
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
- restart_close_button->set_icon(get_editor_theme_icon(SNAME("Close")));
+ restart_close_button->set_button_icon(get_editor_theme_icon(SNAME("Close")));
restart_container->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SceneStringName(panel), SNAME("Tree")));
restart_icon->set_texture(get_editor_theme_icon(SNAME("StatusWarning")));
restart_label->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp
index 90e4d74fcb..dc1198167d 100644
--- a/editor/scene_create_dialog.cpp
+++ b/editor/scene_create_dialog.cpp
@@ -48,10 +48,10 @@
void SceneCreateDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- select_node_button->set_icon(get_editor_theme_icon(SNAME("ClassList")));
- node_type_2d->set_icon(get_editor_theme_icon(SNAME("Node2D")));
- node_type_3d->set_icon(get_editor_theme_icon(SNAME("Node3D")));
- node_type_gui->set_icon(get_editor_theme_icon(SNAME("Control")));
+ select_node_button->set_button_icon(get_editor_theme_icon(SNAME("ClassList")));
+ node_type_2d->set_button_icon(get_editor_theme_icon(SNAME("Node2D")));
+ node_type_3d->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
+ node_type_gui->set_button_icon(get_editor_theme_icon(SNAME("Control")));
node_type_other->add_theme_icon_override(SNAME("icon"), get_editor_theme_icon(SNAME("Node")));
} break;
@@ -121,9 +121,9 @@ void SceneCreateDialog::update_dialog() {
const StringName root_type_name = StringName(other_type_display->get_text());
if (has_theme_icon(root_type_name, EditorStringName(EditorIcons))) {
- node_type_other->set_icon(get_editor_theme_icon(root_type_name));
+ node_type_other->set_button_icon(get_editor_theme_icon(root_type_name));
} else {
- node_type_other->set_icon(nullptr);
+ node_type_other->set_button_icon(nullptr);
}
root_name = root_name_edit->get_text().strip_edges();
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 0f359a3af8..19b7122a0d 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1590,7 +1590,7 @@ void SceneTreeDock::_notification(int p_what) {
node_shortcuts_toggle = memnew(Button);
node_shortcuts_toggle->set_flat(true);
- node_shortcuts_toggle->set_icon(get_editor_theme_icon(SNAME("Favorites")));
+ node_shortcuts_toggle->set_button_icon(get_editor_theme_icon(SNAME("Favorites")));
node_shortcuts_toggle->set_toggle_mode(true);
node_shortcuts_toggle->set_tooltip_text(TTR("Toggle the display of favorite nodes."));
node_shortcuts_toggle->set_pressed(EDITOR_GET("_use_favorites_root_selection"));
@@ -1615,19 +1615,19 @@ void SceneTreeDock::_notification(int p_what) {
button_2d = memnew(Button);
beginner_node_shortcuts->add_child(button_2d);
button_2d->set_text(TTR("2D Scene"));
- button_2d->set_icon(get_editor_theme_icon(SNAME("Node2D")));
+ button_2d->set_button_icon(get_editor_theme_icon(SNAME("Node2D")));
button_2d->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_CREATE_2D_SCENE, false));
button_3d = memnew(Button);
beginner_node_shortcuts->add_child(button_3d);
button_3d->set_text(TTR("3D Scene"));
- button_3d->set_icon(get_editor_theme_icon(SNAME("Node3D")));
+ button_3d->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
button_3d->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_CREATE_3D_SCENE, false));
button_ui = memnew(Button);
beginner_node_shortcuts->add_child(button_ui);
button_ui->set_text(TTR("User Interface"));
- button_ui->set_icon(get_editor_theme_icon(SNAME("Control")));
+ button_ui->set_button_icon(get_editor_theme_icon(SNAME("Control")));
button_ui->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_CREATE_USER_INTERFACE, false));
favorite_node_shortcuts = memnew(VBoxContainer);
@@ -1636,13 +1636,13 @@ void SceneTreeDock::_notification(int p_what) {
button_custom = memnew(Button);
node_shortcuts->add_child(button_custom);
button_custom->set_text(TTR("Other Node"));
- button_custom->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_custom->set_button_icon(get_editor_theme_icon(SNAME("Add")));
button_custom->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_NEW, false));
button_clipboard = memnew(Button);
node_shortcuts->add_child(button_clipboard);
button_clipboard->set_text(TTR("Paste From Clipboard"));
- button_clipboard->set_icon(get_editor_theme_icon(SNAME("ActionPaste")));
+ button_clipboard->set_button_icon(get_editor_theme_icon(SNAME("ActionPaste")));
button_clipboard->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(TOOL_PASTE, false));
_update_create_root_dialog(true);
@@ -1664,12 +1664,12 @@ void SceneTreeDock::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- button_add->set_icon(get_editor_theme_icon(SNAME("Add")));
- button_instance->set_icon(get_editor_theme_icon(SNAME("Instance")));
- button_create_script->set_icon(get_editor_theme_icon(SNAME("ScriptCreate")));
- button_detach_script->set_icon(get_editor_theme_icon(SNAME("ScriptRemove")));
- button_extend_script->set_icon(get_editor_theme_icon(SNAME("ScriptExtend")));
- button_tree_menu->set_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
+ button_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
+ button_instance->set_button_icon(get_editor_theme_icon(SNAME("Instance")));
+ button_create_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptCreate")));
+ button_detach_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptRemove")));
+ button_extend_script->set_button_icon(get_editor_theme_icon(SNAME("ScriptExtend")));
+ button_tree_menu->set_button_icon(get_editor_theme_icon(SNAME("GuiTabMenuHl")));
filter->set_right_icon(get_editor_theme_icon(SNAME("Search")));
@@ -1680,19 +1680,19 @@ void SceneTreeDock::_notification(int p_what) {
// These buttons are created on READY, because reasons...
if (button_2d) {
- button_2d->set_icon(get_editor_theme_icon(SNAME("Node2D")));
+ button_2d->set_button_icon(get_editor_theme_icon(SNAME("Node2D")));
}
if (button_3d) {
- button_3d->set_icon(get_editor_theme_icon(SNAME("Node3D")));
+ button_3d->set_button_icon(get_editor_theme_icon(SNAME("Node3D")));
}
if (button_ui) {
- button_ui->set_icon(get_editor_theme_icon(SNAME("Control")));
+ button_ui->set_button_icon(get_editor_theme_icon(SNAME("Control")));
}
if (button_custom) {
- button_custom->set_icon(get_editor_theme_icon(SNAME("Add")));
+ button_custom->set_button_icon(get_editor_theme_icon(SNAME("Add")));
}
if (button_clipboard) {
- button_clipboard->set_icon(get_editor_theme_icon(SNAME("ActionPaste")));
+ button_clipboard->set_button_icon(get_editor_theme_icon(SNAME("ActionPaste")));
}
menu_subresources->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
@@ -4337,7 +4337,7 @@ void SceneTreeDock::_update_create_root_dialog(bool p_initializing) {
if (ScriptServer::is_global_class(name)) {
name = ScriptServer::get_global_class_native_base(name);
}
- button->set_icon(EditorNode::get_singleton()->get_class_icon(name));
+ button->set_button_icon(EditorNode::get_singleton()->get_class_icon(name));
button->connect(SceneStringName(pressed), callable_mp(this, &SceneTreeDock::_favorite_root_selected).bind(l));
}
}
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 0cb4952b04..8dd2fe8e4e 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -135,9 +135,9 @@ void ScriptCreateDialog::_notification(int p_what) {
}
}
- path_button->set_icon(get_editor_theme_icon(SNAME("Folder")));
- parent_browse_button->set_icon(get_editor_theme_icon(SNAME("Folder")));
- parent_search_button->set_icon(get_editor_theme_icon(SNAME("ClassList")));
+ path_button->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
+ parent_browse_button->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
+ parent_search_button->set_button_icon(get_editor_theme_icon(SNAME("ClassList")));
} break;
}
}
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 846e8867a1..2bfe088e7f 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -74,7 +74,7 @@ void ShaderCreateDialog::_notification(int p_what) {
}
}
- path_button->set_icon(get_editor_theme_icon(SNAME("Folder")));
+ path_button->set_button_icon(get_editor_theme_icon(SNAME("Folder")));
} break;
}
}
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp
index 85e5cd6ea0..a53b621097 100644
--- a/editor/shader_globals_editor.cpp
+++ b/editor/shader_globals_editor.cpp
@@ -438,7 +438,7 @@ void ShaderGlobalsEditor::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- variable_add->set_icon(get_editor_theme_icon(SNAME("Add")));
+ variable_add->set_button_icon(get_editor_theme_icon(SNAME("Add")));
} break;
case NOTIFICATION_PREDELETE: {
diff --git a/editor/window_wrapper.cpp b/editor/window_wrapper.cpp
index 7f61623980..3256680416 100644
--- a/editor/window_wrapper.cpp
+++ b/editor/window_wrapper.cpp
@@ -390,7 +390,7 @@ void ScreenSelect::_notification(int p_what) {
connect(SceneStringName(gui_input), callable_mp(this, &ScreenSelect::_handle_mouse_shortcut));
} break;
case NOTIFICATION_THEME_CHANGED: {
- set_icon(get_editor_theme_icon("MakeFloating"));
+ set_button_icon(get_editor_theme_icon("MakeFloating"));
const real_t popup_height = real_t(get_theme_font_size(SceneStringName(font_size))) * 2.0;
popup->set_min_size(Size2(0, popup_height * 3));
diff --git a/modules/csg/editor/csg_gizmos.cpp b/modules/csg/editor/csg_gizmos.cpp
index e5d33dd179..7e1c2e39b3 100644
--- a/modules/csg/editor/csg_gizmos.cpp
+++ b/modules/csg/editor/csg_gizmos.cpp
@@ -63,7 +63,7 @@ void CSGShapeEditor::edit(CSGShape3D *p_csg_shape) {
void CSGShapeEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- options->set_icon(get_editor_theme_icon(SNAME("CSGCombiner3D")));
+ options->set_button_icon(get_editor_theme_icon(SNAME("CSGCombiner3D")));
} break;
}
}
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp
index 8e5a992bd4..542e00e560 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -503,7 +503,7 @@ void EditorFileSystemImportFormatSupportQueryBlend::_browse_install() {
}
void EditorFileSystemImportFormatSupportQueryBlend::_update_icons() {
- blender_path_browse->set_icon(blender_path_browse->get_editor_theme_icon(SNAME("FolderBrowse")));
+ blender_path_browse->set_button_icon(blender_path_browse->get_editor_theme_icon(SNAME("FolderBrowse")));
}
bool EditorFileSystemImportFormatSupportQueryBlend::query() {
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index 4c11565c51..bd2792d92a 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -1058,10 +1058,10 @@ void GridMapEditor::_draw_grids(const Vector3 &cell_size) {
}
void GridMapEditor::_update_theme() {
- options->set_icon(get_theme_icon(SNAME("GridMap"), EditorStringName(EditorIcons)));
+ options->set_button_icon(get_theme_icon(SNAME("GridMap"), EditorStringName(EditorIcons)));
search_box->set_right_icon(get_theme_icon(SNAME("Search"), EditorStringName(EditorIcons)));
- mode_thumbnail->set_icon(get_theme_icon(SNAME("FileThumbnail"), EditorStringName(EditorIcons)));
- mode_list->set_icon(get_theme_icon(SNAME("FileList"), EditorStringName(EditorIcons)));
+ mode_thumbnail->set_button_icon(get_theme_icon(SNAME("FileThumbnail"), EditorStringName(EditorIcons)));
+ mode_list->set_button_icon(get_theme_icon(SNAME("FileList"), EditorStringName(EditorIcons)));
}
void GridMapEditor::_notification(int p_what) {
diff --git a/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp b/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp
index fcb477995f..a29646e4a3 100644
--- a/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp
+++ b/modules/interactive_music/editor/audio_stream_interactive_editor_plugin.cpp
@@ -396,7 +396,7 @@ void EditorInspectorPluginAudioStreamInteractive::_edit(Object *p_object) {
void EditorInspectorPluginAudioStreamInteractive::parse_end(Object *p_object) {
if (Object::cast_to<AudioStreamInteractive>(p_object)) {
Button *button = EditorInspector::create_inspector_action_button(TTR("Edit Transitions"));
- button->set_icon(audio_stream_interactive_transition_editor->get_editor_theme_icon(SNAME("Blend")));
+ button->set_button_icon(audio_stream_interactive_transition_editor->get_editor_theme_icon(SNAME("Blend")));
button->connect(SceneStringName(pressed), callable_mp(this, &EditorInspectorPluginAudioStreamInteractive::_edit).bind(p_object));
add_custom_control(button);
}
diff --git a/modules/multiplayer/editor/editor_network_profiler.cpp b/modules/multiplayer/editor/editor_network_profiler.cpp
index f5f20d6931..dc3a3e3be7 100644
--- a/modules/multiplayer/editor/editor_network_profiler.cpp
+++ b/modules/multiplayer/editor/editor_network_profiler.cpp
@@ -45,11 +45,11 @@ void EditorNetworkProfiler::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
if (activate->is_pressed()) {
- activate->set_icon(theme_cache.stop_icon);
+ activate->set_button_icon(theme_cache.stop_icon);
} else {
- activate->set_icon(theme_cache.play_icon);
+ activate->set_button_icon(theme_cache.play_icon);
}
- clear_button->set_icon(theme_cache.clear_icon);
+ clear_button->set_button_icon(theme_cache.clear_icon);
incoming_bandwidth_text->set_right_icon(theme_cache.incoming_bandwidth_icon);
outgoing_bandwidth_text->set_right_icon(theme_cache.outgoing_bandwidth_icon);
@@ -184,10 +184,10 @@ void EditorNetworkProfiler::_activate_pressed() {
void EditorNetworkProfiler::_update_button_text() {
if (activate->is_pressed()) {
- activate->set_icon(theme_cache.stop_icon);
+ activate->set_button_icon(theme_cache.stop_icon);
activate->set_text(TTR("Stop"));
} else {
- activate->set_icon(theme_cache.play_icon);
+ activate->set_button_icon(theme_cache.play_icon);
activate->set_text(TTR("Start"));
}
}
diff --git a/modules/multiplayer/editor/replication_editor.cpp b/modules/multiplayer/editor/replication_editor.cpp
index 386feae4f9..8de82ef409 100644
--- a/modules/multiplayer/editor/replication_editor.cpp
+++ b/modules/multiplayer/editor/replication_editor.cpp
@@ -353,8 +353,8 @@ void ReplicationEditor::_notification(int p_what) {
}
case NOTIFICATION_ENTER_TREE: {
add_theme_style_override(SceneStringName(panel), EditorNode::get_singleton()->get_editor_theme()->get_stylebox(SceneStringName(panel), SNAME("Panel")));
- add_pick_button->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
- pin->set_icon(get_theme_icon(SNAME("Pin"), EditorStringName(EditorIcons)));
+ add_pick_button->set_button_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
+ pin->set_button_icon(get_theme_icon(SNAME("Pin"), EditorStringName(EditorIcons)));
} break;
}
}
diff --git a/modules/navigation/editor/navigation_mesh_editor_plugin.cpp b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp
index 7f0cbc7b5e..ed0cdeb287 100644
--- a/modules/navigation/editor/navigation_mesh_editor_plugin.cpp
+++ b/modules/navigation/editor/navigation_mesh_editor_plugin.cpp
@@ -54,8 +54,8 @@ void NavigationMeshEditor::_node_removed(Node *p_node) {
void NavigationMeshEditor::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- button_bake->set_icon(get_theme_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
- button_reset->set_icon(get_theme_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
+ button_bake->set_button_icon(get_theme_icon(SNAME("Bake"), EditorStringName(EditorIcons)));
+ button_reset->set_button_icon(get_theme_icon(SNAME("Reload"), EditorStringName(EditorIcons)));
} break;
}
}
diff --git a/modules/openxr/editor/openxr_action_editor.cpp b/modules/openxr/editor/openxr_action_editor.cpp
index 63162ba3dc..dd5f6378f4 100644
--- a/modules/openxr/editor/openxr_action_editor.cpp
+++ b/modules/openxr/editor/openxr_action_editor.cpp
@@ -41,7 +41,7 @@ void OpenXRActionEditor::_bind_methods() {
}
void OpenXRActionEditor::_theme_changed() {
- rem_action->set_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
+ rem_action->set_button_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
}
void OpenXRActionEditor::_notification(int p_what) {
diff --git a/modules/openxr/editor/openxr_action_set_editor.cpp b/modules/openxr/editor/openxr_action_set_editor.cpp
index 0c55592707..e5e034ef08 100644
--- a/modules/openxr/editor/openxr_action_set_editor.cpp
+++ b/modules/openxr/editor/openxr_action_set_editor.cpp
@@ -46,16 +46,16 @@ void OpenXRActionSetEditor::_bind_methods() {
void OpenXRActionSetEditor::_set_fold_icon() {
if (is_expanded) {
- fold_btn->set_icon(get_theme_icon(SNAME("GuiTreeArrowDown"), EditorStringName(EditorIcons)));
+ fold_btn->set_button_icon(get_theme_icon(SNAME("GuiTreeArrowDown"), EditorStringName(EditorIcons)));
} else {
- fold_btn->set_icon(get_theme_icon(SNAME("GuiTreeArrowRight"), EditorStringName(EditorIcons)));
+ fold_btn->set_button_icon(get_theme_icon(SNAME("GuiTreeArrowRight"), EditorStringName(EditorIcons)));
}
}
void OpenXRActionSetEditor::_theme_changed() {
_set_fold_icon();
- add_action->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
- rem_action_set->set_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
+ add_action->set_button_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
+ rem_action_set->set_button_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
}
void OpenXRActionSetEditor::_notification(int p_what) {
diff --git a/modules/openxr/editor/openxr_interaction_profile_editor.cpp b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
index 09a9a990ed..a390919856 100644
--- a/modules/openxr/editor/openxr_interaction_profile_editor.cpp
+++ b/modules/openxr/editor/openxr_interaction_profile_editor.cpp
@@ -218,7 +218,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
path_hb->add_child(type_label);
Button *path_add = memnew(Button);
- path_add->set_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
+ path_add->set_button_icon(get_theme_icon(SNAME("Add"), EditorStringName(EditorIcons)));
path_add->set_flat(true);
path_add->connect(SceneStringName(pressed), callable_mp(this, &OpenXRInteractionProfileEditor::select_action_for).bind(String(p_io_path->openxr_path)));
path_hb->add_child(path_add);
@@ -245,7 +245,7 @@ void OpenXRInteractionProfileEditor::_add_io_path(VBoxContainer *p_container, co
Button *action_rem = memnew(Button);
action_rem->set_flat(true);
- action_rem->set_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
+ action_rem->set_button_icon(get_theme_icon(SNAME("Remove"), EditorStringName(EditorIcons)));
action_rem->connect(SceneStringName(pressed), callable_mp((OpenXRInteractionProfileEditor *)this, &OpenXRInteractionProfileEditor::_on_remove_pressed).bind(action->get_name_with_set(), String(p_io_path->openxr_path)));
action_hb->add_child(action_rem);
}
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 9df4bfde92..4bd85cbde9 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -642,7 +642,7 @@ String Button::get_language() const {
return language;
}
-void Button::set_icon(const Ref<Texture2D> &p_icon) {
+void Button::set_button_icon(const Ref<Texture2D> &p_icon) {
if (icon == p_icon) {
return;
}
@@ -666,7 +666,7 @@ void Button::_texture_changed() {
update_minimum_size();
}
-Ref<Texture2D> Button::get_icon() const {
+Ref<Texture2D> Button::get_button_icon() const {
return icon;
}
@@ -762,8 +762,8 @@ void Button::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_text_direction"), &Button::get_text_direction);
ClassDB::bind_method(D_METHOD("set_language", "language"), &Button::set_language);
ClassDB::bind_method(D_METHOD("get_language"), &Button::get_language);
- ClassDB::bind_method(D_METHOD("set_button_icon", "texture"), &Button::set_icon);
- ClassDB::bind_method(D_METHOD("get_button_icon"), &Button::get_icon);
+ ClassDB::bind_method(D_METHOD("set_button_icon", "texture"), &Button::set_button_icon);
+ ClassDB::bind_method(D_METHOD("get_button_icon"), &Button::get_button_icon);
ClassDB::bind_method(D_METHOD("set_flat", "enabled"), &Button::set_flat);
ClassDB::bind_method(D_METHOD("is_flat"), &Button::is_flat);
ClassDB::bind_method(D_METHOD("set_clip_text", "enabled"), &Button::set_clip_text);
diff --git a/scene/gui/button.h b/scene/gui/button.h
index 5f4429bc1d..b86d6a6c1f 100644
--- a/scene/gui/button.h
+++ b/scene/gui/button.h
@@ -137,8 +137,8 @@ public:
void set_language(const String &p_language);
String get_language() const;
- void set_icon(const Ref<Texture2D> &p_icon);
- Ref<Texture2D> get_icon() const;
+ void set_button_icon(const Ref<Texture2D> &p_icon);
+ Ref<Texture2D> get_button_icon() const;
void set_expand_icon(bool p_enabled);
bool is_expand_icon() const;
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 2d88a9bddf..997120ff25 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -80,10 +80,10 @@ void ColorPicker::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- btn_pick->set_icon(theme_cache.screen_picker);
+ btn_pick->set_button_icon(theme_cache.screen_picker);
_update_drop_down_arrow(btn_preset->is_pressed(), btn_preset);
_update_drop_down_arrow(btn_recent_preset->is_pressed(), btn_recent_preset);
- btn_add_preset->set_icon(theme_cache.add_preset);
+ btn_add_preset->set_button_icon(theme_cache.add_preset);
btn_pick->set_custom_minimum_size(Size2(28 * theme_cache.base_scale, 0));
btn_shape->set_custom_minimum_size(Size2(28 * theme_cache.base_scale, 0));
@@ -116,7 +116,7 @@ void ColorPicker::_notification(int p_what) {
shape_popup->set_item_icon(shape_popup->get_item_index(SHAPE_OKHSL_CIRCLE), theme_cache.shape_circle);
if (current_shape != SHAPE_NONE) {
- btn_shape->set_icon(shape_popup->get_item_icon(current_shape));
+ btn_shape->set_button_icon(shape_popup->get_item_icon(current_shape));
}
internal_margin->begin_bulk_theme_override();
@@ -705,14 +705,14 @@ void ColorPicker::_text_type_toggled() {
if (text_is_constructor) {
text_type->set_text("");
#ifdef TOOLS_ENABLED
- text_type->set_icon(get_editor_theme_icon(SNAME("Script")));
+ text_type->set_button_icon(get_editor_theme_icon(SNAME("Script")));
#endif
c_text->set_editable(false);
c_text->set_tooltip_text(RTR("Copy this constructor in a script."));
} else {
text_type->set_text("#");
- text_type->set_icon(nullptr);
+ text_type->set_button_icon(nullptr);
c_text->set_editable(true);
c_text->set_tooltip_text(ETR("Enter a hex code (\"#ff0000\") or named color (\"red\")."));
@@ -738,7 +738,7 @@ void ColorPicker::set_picker_shape(PickerShapeType p_shape) {
}
if (p_shape != SHAPE_NONE) {
shape_popup->set_item_checked(p_shape, true);
- btn_shape->set_icon(shape_popup->get_item_icon(p_shape));
+ btn_shape->set_button_icon(shape_popup->get_item_icon(p_shape));
}
current_shape = p_shape;
@@ -794,9 +794,9 @@ void ColorPicker::_show_hide_preset(const bool &p_is_btn_pressed, Button *p_btn_
void ColorPicker::_update_drop_down_arrow(const bool &p_is_btn_pressed, Button *p_btn_preset) {
if (p_is_btn_pressed) {
- p_btn_preset->set_icon(theme_cache.expanded_arrow);
+ p_btn_preset->set_button_icon(theme_cache.expanded_arrow);
} else {
- p_btn_preset->set_icon(theme_cache.folded_arrow);
+ p_btn_preset->set_button_icon(theme_cache.folded_arrow);
}
}
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index d8e9d1bcc0..111b8579ec 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -197,18 +197,18 @@ void FileDialog::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED: {
- dir_up->set_icon(theme_cache.parent_folder);
+ dir_up->set_button_icon(theme_cache.parent_folder);
if (vbox->is_layout_rtl()) {
- dir_prev->set_icon(theme_cache.forward_folder);
- dir_next->set_icon(theme_cache.back_folder);
+ dir_prev->set_button_icon(theme_cache.forward_folder);
+ dir_next->set_button_icon(theme_cache.back_folder);
} else {
- dir_prev->set_icon(theme_cache.back_folder);
- dir_next->set_icon(theme_cache.forward_folder);
+ dir_prev->set_button_icon(theme_cache.back_folder);
+ dir_next->set_button_icon(theme_cache.forward_folder);
}
- refresh->set_icon(theme_cache.reload);
- show_hidden->set_icon(theme_cache.toggle_hidden);
- makedir->set_icon(theme_cache.create_folder);
- show_filename_filter_button->set_icon(theme_cache.toggle_filename_filter);
+ refresh->set_button_icon(theme_cache.reload);
+ show_hidden->set_button_icon(theme_cache.toggle_hidden);
+ makedir->set_button_icon(theme_cache.create_folder);
+ show_filename_filter_button->set_button_icon(theme_cache.toggle_filename_filter);
dir_up->begin_bulk_theme_override();
dir_up->add_theme_color_override("icon_normal_color", theme_cache.icon_normal_color);
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index 646757008a..cb495f9d47 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -733,14 +733,14 @@ void GraphEdit::_update_theme_item_cache() {
void GraphEdit::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_THEME_CHANGED: {
- zoom_minus_button->set_icon(theme_cache.zoom_out);
- zoom_reset_button->set_icon(theme_cache.zoom_reset);
- zoom_plus_button->set_icon(theme_cache.zoom_in);
-
- toggle_snapping_button->set_icon(theme_cache.snapping_toggle);
- toggle_grid_button->set_icon(theme_cache.grid_toggle);
- minimap_button->set_icon(theme_cache.minimap_toggle);
- arrange_button->set_icon(theme_cache.layout);
+ zoom_minus_button->set_button_icon(theme_cache.zoom_out);
+ zoom_reset_button->set_button_icon(theme_cache.zoom_reset);
+ zoom_plus_button->set_button_icon(theme_cache.zoom_in);
+
+ toggle_snapping_button->set_button_icon(theme_cache.snapping_toggle);
+ toggle_grid_button->set_button_icon(theme_cache.grid_toggle);
+ minimap_button->set_button_icon(theme_cache.minimap_toggle);
+ arrange_button->set_button_icon(theme_cache.layout);
zoom_label->set_custom_minimum_size(Size2(48, 0) * theme_cache.base_scale);
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 5432058f7b..79018c40f5 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -225,7 +225,7 @@ void OptionButton::set_item_icon(int p_idx, const Ref<Texture2D> &p_icon) {
popup->set_item_icon(p_idx, p_icon);
if (current == p_idx) {
- set_icon(p_icon);
+ set_button_icon(p_icon);
}
_queue_update_size_cache();
}
@@ -381,7 +381,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
current = NONE_SELECTED;
set_text("");
- set_icon(nullptr);
+ set_button_icon(nullptr);
} else {
ERR_FAIL_INDEX(p_which, popup->get_item_count());
@@ -391,7 +391,7 @@ void OptionButton::_select(int p_which, bool p_emit) {
current = p_which;
set_text(popup->get_item_text(current));
- set_icon(popup->get_item_icon(current));
+ set_button_icon(popup->get_item_icon(current));
}
if (is_inside_tree() && p_emit) {