From b9d864bf8e55ed0afa30c50c0924a4f382968c35 Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Tue, 18 Jan 2022 13:41:07 +0300 Subject: [PATCH] Fix toast notification button color on light theme --- editor/editor_toaster.cpp | 8 ++++++++ editor/editor_toaster.h | 1 + editor/icons/Notification.svg | 2 +- editor/icons/NotificationDisabled.svg | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/editor/editor_toaster.cpp b/editor/editor_toaster.cpp index df0588c6419..6c9e4ab0fcd 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