You've already forked godot
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user