Fix accessing editor theme items throughout the UI
This also exposes `EditorInterface::get_editor_theme`.
This commit is contained in:
parent
6e11fcb92c
commit
8ecc0c4f47
55 changed files with 227 additions and 190 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue