You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user