1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:48:14 +00:00

CharacterMap: Move search selection on arrow press in the search textbox

This commit is contained in:
Karol Kosek 2022-03-03 22:22:33 +01:00 committed by Tim Flynn
parent d5fdc6096c
commit d4097f104e

View file

@ -59,6 +59,9 @@ CharacterSearchWidget::CharacterSearchWidget()
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(); };