diff options
Diffstat (limited to 'editor/editor_toaster.cpp')
-rw-r--r-- | editor/editor_toaster.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index 6c9e4ab0fc..f326c9fc37 100644 --- a/editor/editor_toaster.cpp +++ b/editor/editor_toaster.cpp @@ -113,22 +113,22 @@ void EditorToaster::_notification(int p_what) { disable_notifications_button->set_icon(get_theme_icon(SNAME("NotificationDisabled"), SNAME("EditorIcons"))); // Styleboxes background. - info_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); + info_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor"))); - warning_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); - warning_panel_style_background->set_border_color(get_theme_color("warning_color", "Editor")); + warning_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor"))); + warning_panel_style_background->set_border_color(get_theme_color(SNAME("warning_color"), SNAME("Editor"))); - error_panel_style_background->set_bg_color(get_theme_color("base_color", "Editor")); - error_panel_style_background->set_border_color(get_theme_color("error_color", "Editor")); + error_panel_style_background->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor"))); + error_panel_style_background->set_border_color(get_theme_color(SNAME("error_color"), SNAME("Editor"))); // Styleboxes progress. - info_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); + info_panel_style_progress->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor")).lightened(0.03)); - warning_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); - warning_panel_style_progress->set_border_color(get_theme_color("warning_color", "Editor")); + warning_panel_style_progress->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor")).lightened(0.03)); + warning_panel_style_progress->set_border_color(get_theme_color(SNAME("warning_color"), SNAME("Editor"))); - error_panel_style_progress->set_bg_color(get_theme_color("base_color", "Editor").lightened(0.03)); - error_panel_style_progress->set_border_color(get_theme_color("error_color", "Editor")); + error_panel_style_progress->set_bg_color(get_theme_color(SNAME("base_color"), SNAME("Editor")).lightened(0.03)); + error_panel_style_progress->set_border_color(get_theme_color(SNAME("error_color"), SNAME("Editor"))); main_button->update(); disable_notifications_button->update(); @@ -256,13 +256,13 @@ void EditorToaster::_draw_button() { real_t button_radius = main_button->get_size().x / 8; switch (highest_severity) { case SEVERITY_INFO: - color = get_theme_color("accent_color", "Editor"); + color = get_theme_color(SNAME("accent_color"), SNAME("Editor")); break; case SEVERITY_WARNING: - color = get_theme_color("warning_color", "Editor"); + color = get_theme_color(SNAME("warning_color"), SNAME("Editor")); break; case SEVERITY_ERROR: - color = get_theme_color("error_color", "Editor"); + color = get_theme_color(SNAME("error_color"), SNAME("Editor")); break; default: break; @@ -333,13 +333,13 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_ panel->set_tooltip(p_tooltip); switch (p_severity) { case SEVERITY_INFO: - panel->add_theme_style_override("panel", info_panel_style_background); + panel->add_theme_style_override(SNAME("panel"), info_panel_style_background); break; case SEVERITY_WARNING: - panel->add_theme_style_override("panel", warning_panel_style_background); + panel->add_theme_style_override(SNAME("panel"), warning_panel_style_background); break; case SEVERITY_ERROR: - panel->add_theme_style_override("panel", error_panel_style_background); + panel->add_theme_style_override(SNAME("panel"), error_panel_style_background); break; default: break; @@ -360,7 +360,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_theme_icon("Close", "EditorIcons")); + close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); close_button->connect("pressed", callable_bind(callable_mp(this, &EditorToaster::close), panel)); close_button->connect("theme_changed", callable_bind(callable_mp(this, &EditorToaster::_close_button_theme_changed), close_button)); hbox_container->add_child(close_button); @@ -442,7 +442,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_theme_icon("Close", "EditorIcons")); + close_button->set_icon(get_theme_icon(SNAME("Close"), SNAME("EditorIcons"))); } } @@ -508,7 +508,7 @@ EditorToaster::EditorToaster() { // Disable notification button. disable_notifications_panel = memnew(PanelContainer); disable_notifications_panel->set_as_top_level(true); - disable_notifications_panel->add_theme_style_override("panel", info_panel_style_background); + disable_notifications_panel->add_theme_style_override(SNAME("panel"), info_panel_style_background); add_child(disable_notifications_panel); disable_notifications_button = memnew(Button); |