diff options
Diffstat (limited to 'Userland/Applications/CharacterMap/CharacterSearchWidget.cpp')
-rw-r--r-- | Userland/Applications/CharacterMap/CharacterSearchWidget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp index 29e8736563..35803cf1d5 100644 --- a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp +++ b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp @@ -8,6 +8,7 @@ #include "CharacterSearchWidget.h" #include "SearchCharacters.h" #include <Applications/CharacterMap/CharacterSearchWindowGML.h> +#include <LibCore/Debounce.h> struct SearchResult { u32 code_point; @@ -56,14 +57,12 @@ CharacterSearchWidget::CharacterSearchWidget() load_from_gml(character_search_window_gml).release_value_but_fixme_should_propagate_errors(); m_search_input = find_descendant_of_type_named<GUI::TextBox>("search_input"); - m_search_button = find_descendant_of_type_named<GUI::Button>("search_button"); m_results_table = find_descendant_of_type_named<GUI::TableView>("results_table"); m_search_input->on_up_pressed = [this] { m_results_table->move_cursor(GUI::AbstractView::CursorMovement::Up, GUI::AbstractView::SelectionUpdate::Set); }; m_search_input->on_down_pressed = [this] { m_results_table->move_cursor(GUI::AbstractView::CursorMovement::Down, GUI::AbstractView::SelectionUpdate::Set); }; - m_search_input->on_return_pressed = [this] { search(); }; - m_search_button->on_click = [this](auto) { search(); }; + m_search_input->on_change = Core::debounce([this] { search(); }, 100); m_results_table->horizontal_scrollbar().set_visible(false); m_results_table->set_column_headers_visible(false); |