summaryrefslogtreecommitdiffstats
path: root/editor/editor_quick_open.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-12-04 13:18:48 +0100
committerYuri Sizov <yuris@humnom.net>2023-12-04 13:18:48 +0100
commit01888ae7ab2d8989b6e25cb2edbe7b3d27cf4e4e (patch)
tree4e1bfbf8a8a6eb05279582dd5fe527a427f3cbeb /editor/editor_quick_open.cpp
parentd76c1d0e516fedc535a2e394ab780cac79203477 (diff)
downloadredot-engine-01888ae7ab2d8989b6e25cb2edbe7b3d27cf4e4e.tar.gz
Fix theme application in various editor dialogs
99% of the time we shouldn't rely on the signal, we should use the notification instead. I left some comments in places where I couldn't quickly improve the code.
Diffstat (limited to 'editor/editor_quick_open.cpp')
-rw-r--r--editor/editor_quick_open.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/editor_quick_open.cpp b/editor/editor_quick_open.cpp
index 82313c12e2..965d0269d6 100644
--- a/editor/editor_quick_open.cpp
+++ b/editor/editor_quick_open.cpp
@@ -250,23 +250,22 @@ void EditorQuickOpen::_notification(int p_what) {
}
} break;
+ case NOTIFICATION_THEME_CHANGED: {
+ search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
+ } break;
+
case NOTIFICATION_EXIT_TREE: {
disconnect("confirmed", callable_mp(this, &EditorQuickOpen::_confirmed));
} break;
}
}
-void EditorQuickOpen::_theme_changed() {
- search_box->set_right_icon(search_options->get_editor_theme_icon(SNAME("Search")));
-}
-
void EditorQuickOpen::_bind_methods() {
ADD_SIGNAL(MethodInfo("quick_open"));
}
EditorQuickOpen::EditorQuickOpen() {
VBoxContainer *vbc = memnew(VBoxContainer);
- vbc->connect("theme_changed", callable_mp(this, &EditorQuickOpen::_theme_changed));
add_child(vbc);
search_box = memnew(LineEdit);