Merge pull request #20155 from Tunous/line-edit-clear
Add clear button to search fields
This commit is contained in:
commit
68ab428d4d
23 changed files with 279 additions and 212 deletions
|
|
@ -253,7 +253,8 @@ void EditorHelpSearch::_notification(int p_what) {
|
|||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
||||
|
||||
//_update_icons
|
||||
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
|
||||
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
|
||||
search_box->set_clear_button_enabled(true);
|
||||
|
||||
connect("confirmed", this, "_confirmed");
|
||||
_update_search();
|
||||
|
|
@ -267,7 +268,8 @@ void EditorHelpSearch::_notification(int p_what) {
|
|||
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
|
||||
//_update_icons
|
||||
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
|
||||
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
|
||||
search_box->set_clear_button_enabled(true);
|
||||
} else if (p_what == NOTIFICATION_PROCESS) {
|
||||
|
||||
if (search.is_valid()) {
|
||||
|
|
@ -381,7 +383,8 @@ void EditorHelpIndex::_notification(int p_what) {
|
|||
if (p_what == NOTIFICATION_ENTER_TREE) {
|
||||
|
||||
//_update_icons
|
||||
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
|
||||
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
|
||||
search_box->set_clear_button_enabled(true);
|
||||
_update_class_list();
|
||||
|
||||
connect("confirmed", this, "_tree_item_selected");
|
||||
|
|
@ -392,7 +395,8 @@ void EditorHelpIndex::_notification(int p_what) {
|
|||
} else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
|
||||
|
||||
//_update_icons
|
||||
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
|
||||
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
|
||||
search_box->set_clear_button_enabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue