diff options
author | Łukasz Rutkowski <lukus178@gmail.com> | 2018-07-26 13:45:38 +0200 |
---|---|---|
committer | Łukasz Rutkowski <lukus178@gmail.com> | 2018-08-11 12:04:26 +0200 |
commit | e8a435c8cdc5778ebae5e66d983a7bc720f81e85 (patch) | |
tree | bcdea4f8fece7b12922c5037d22541ff7d179737 /editor/editor_help.cpp | |
parent | 0fc1c4eda8acd97af36228ed1d947bb5cdb2634a (diff) | |
download | redot-engine-e8a435c8cdc5778ebae5e66d983a7bc720f81e85.tar.gz |
Add clear text button to LineEdit
- Add pressed state to clear button
- Enable clear button on all inputs with search icon
- Remove duplicate clear buttons
- Fix rendering of icon for center and right alignments
- Add clear button to more search fields
- Add clear icon to default theme
- Add method to control enabled state of clear button
- Add property to enable clear button from inspector
Diffstat (limited to 'editor/editor_help.cpp')
-rw-r--r-- | editor/editor_help.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index b7a5f67870..1544d74570 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -254,6 +254,7 @@ void EditorHelpSearch::_notification(int p_what) { //_update_icons search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons")); + search_box->set_clear_button_enabled(true); connect("confirmed", this, "_confirmed"); _update_search(); @@ -268,6 +269,7 @@ void EditorHelpSearch::_notification(int p_what) { //_update_icons search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons")); + search_box->set_clear_button_enabled(true); } else if (p_what == NOTIFICATION_PROCESS) { if (search.is_valid()) { @@ -382,6 +384,7 @@ void EditorHelpIndex::_notification(int p_what) { //_update_icons search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons")); + search_box->set_clear_button_enabled(true); _update_class_list(); connect("confirmed", this, "_tree_item_selected"); @@ -393,6 +396,7 @@ void EditorHelpIndex::_notification(int p_what) { //_update_icons search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons")); + search_box->set_clear_button_enabled(true); } } |