diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-10-30 05:22:24 -0400 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-10-30 05:22:24 -0400 |
commit | 82de309d58c5f0e221b85463cca2983cd7ed0289 (patch) | |
tree | 5c87dc486c61310a1eafc2e7cb2fd52be0d52e22 /editor/gui | |
parent | 77eaec766e2e40f2a5d399989d827f9582a3be15 (diff) | |
parent | 8004c7524fb9f43425c4d6f614410a76678e0f7c (diff) | |
download | redot-engine-82de309d58c5f0e221b85463cca2983cd7ed0289.tar.gz |
Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7c
Diffstat (limited to 'editor/gui')
-rw-r--r-- | editor/gui/editor_bottom_panel.cpp | 2 | ||||
-rw-r--r-- | editor/gui/editor_file_dialog.cpp | 32 | ||||
-rw-r--r-- | editor/gui/editor_quick_open_dialog.cpp | 8 | ||||
-rw-r--r-- | editor/gui/editor_run_bar.cpp | 14 | ||||
-rw-r--r-- | editor/gui/editor_scene_tabs.cpp | 2 | ||||
-rw-r--r-- | editor/gui/editor_toaster.cpp | 16 | ||||
-rw-r--r-- | editor/gui/editor_zoom_widget.cpp | 4 |
7 files changed, 39 insertions, 39 deletions
diff --git a/editor/gui/editor_bottom_panel.cpp b/editor/gui/editor_bottom_panel.cpp index badc237582..5390c9e2e1 100644 --- a/editor/gui/editor_bottom_panel.cpp +++ b/editor/gui/editor_bottom_panel.cpp @@ -47,7 +47,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 7f6a5d16fb..b1e837ffae 100644 --- a/editor/gui/editor_file_dialog.cpp +++ b/editor/gui/editor_file_dialog.cpp @@ -352,7 +352,7 @@ void EditorFileDialog::shortcut_input(const Ref<InputEvent> &p_event) { void EditorFileDialog::set_enable_multiple_selection(bool p_enable) { item_list->set_select_mode(p_enable ? ItemList::SELECT_MULTI : ItemList::SELECT_SINGLE); -}; +} Vector<String> EditorFileDialog::get_selected_files() const { Vector<String> list; @@ -362,7 +362,7 @@ Vector<String> EditorFileDialog::get_selected_files() const { } } return list; -}; +} void EditorFileDialog::update_dir() { if (drives->is_visible()) { @@ -1485,29 +1485,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 a01f474254..1157831dd5 100644 --- a/editor/gui/editor_quick_open_dialog.cpp +++ b/editor/gui/editor_quick_open_dialog.cpp @@ -615,10 +615,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")); } } @@ -714,9 +714,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 e83618c1df..ce157491e4 100644 --- a/editor/gui/editor_run_bar.cpp +++ b/editor/gui/editor_run_bar.cpp @@ -54,8 +54,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))); @@ -65,7 +65,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))); @@ -79,15 +79,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.")); } @@ -108,7 +108,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 b4a32ef634..e9765409f3 100644 --- a/editor/gui/editor_scene_tabs.cpp +++ b/editor/gui/editor_scene_tabs.cpp @@ -55,7 +55,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 ebb4782043..7f401c9dc5 100644 --- a/editor/gui/editor_toaster.cpp +++ b/editor/gui/editor_toaster.cpp @@ -113,11 +113,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))); @@ -313,9 +313,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(); } @@ -377,7 +377,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); @@ -493,7 +493,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"))); } } @@ -568,7 +568,7 @@ EditorToaster::EditorToaster() { eh.errfunc = _error_handler; add_error_handler(&eh); -}; +} EditorToaster::~EditorToaster() { singleton = nullptr; diff --git a/editor/gui/editor_zoom_widget.cpp b/editor/gui/editor_zoom_widget.cpp index bcca8d679e..6e5672210e 100644 --- a/editor/gui/editor_zoom_widget.cpp +++ b/editor/gui/editor_zoom_widget.cpp @@ -164,8 +164,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; } } |