diff options
Diffstat (limited to 'editor/editor_toaster.cpp')
-rw-r--r-- | editor/editor_toaster.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index df0588c641..6c9e4ab0fc 100644 --- a/editor/editor_toaster.cpp +++ b/editor/editor_toaster.cpp @@ -362,6 +362,7 @@ Control *EditorToaster::popup(Control *p_control, Severity p_severity, double p_ close_button->set_flat(true); close_button->set_icon(get_theme_icon("Close", "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); } @@ -438,6 +439,13 @@ void EditorToaster::close(Control *p_control) { toasts[p_control].popped = false; } +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")); + } +} + EditorToaster *EditorToaster::get_singleton() { return singleton; } |