1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Fix accessing editor theme items throughout the UI

This also exposes `EditorInterface::get_editor_theme`.
This commit is contained in:
Yuri Sizov
2023-09-13 13:14:07 +02:00
parent 6e11fcb92c
commit 8ecc0c4f47
55 changed files with 227 additions and 190 deletions

View File

@@ -454,16 +454,10 @@ void CreateDialog::_sbox_input(const Ref<InputEvent> &p_ie) {
}
}
void CreateDialog::_update_theme() {
search_box->set_right_icon(search_options->get_editor_theme_icon(SNAME("Search")));
favorite->set_icon(search_options->get_editor_theme_icon(SNAME("Favorites")));
}
void CreateDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
connect("confirmed", callable_mp(this, &CreateDialog::_confirmed));
_update_theme();
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -485,7 +479,8 @@ void CreateDialog::_notification(int p_what) {
favorites->add_theme_constant_override("icon_max_width", icon_width);
recent->set_fixed_icon_size(Size2(icon_width, icon_width));
_update_theme();
search_box->set_right_icon(get_editor_theme_icon(SNAME("Search")));
favorite->set_icon(get_editor_theme_icon(SNAME("Favorites")));
} break;
}
}