diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-03-03 22:22:33 +0100 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-03-04 11:53:04 -0500 |
commit | d4097f104e9f9d27da238cdba8e82330de2418d6 (patch) | |
tree | eb6aecef41846748bdef9daccbc26cf6d8b5b35a /Userland/Applications/CharacterMap | |
parent | d5fdc6096cd549e5571a5f97eedc6f2450826569 (diff) | |
download | serenity-d4097f104e9f9d27da238cdba8e82330de2418d6.zip |
CharacterMap: Move search selection on arrow press in the search textbox
Diffstat (limited to 'Userland/Applications/CharacterMap')
-rw-r--r-- | Userland/Applications/CharacterMap/CharacterSearchWidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp index c27571d64e..b351e01da7 100644 --- a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp +++ b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp @@ -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(); }; |