summaryrefslogtreecommitdiffstats
path: root/editor/gui
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2024-10-09 15:21:47 -0700
committerAaron Franke <arnfranke@yahoo.com>2024-10-29 16:23:03 -0700
commit562c666e3dfc9f0fe72a33974c23373dff77c825 (patch)
tree9d703690d34b0221fc8fa0738cab3a7a697419ba /editor/gui
parent0debc73dc6eb2c1a4986766506180394e69bda11 (diff)
downloadredot-engine-562c666e3dfc9f0fe72a33974c23373dff77c825.tar.gz
Rename internal Button icon to button_icon to match exposed methods
Diffstat (limited to 'editor/gui')
-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
7 files changed, 36 insertions, 36 deletions
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 7600748685..83268f315c 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 24f19db578..223f362ea7 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;
}
}