mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
HackStudio: Add FindWidget
The find widget appears on Ctrl+F. It uses the GUI::TextEditor search API to search for text, which also takes care of highlighting the search results.
This commit is contained in:
parent
de902ab659
commit
d9d299f884
8 changed files with 186 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
|
||||
* Copyright (c) 2020-2022, Itamar S. <itamar8910@gmail.com>
|
||||
* Copyright (c) 2020-2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -1445,6 +1445,11 @@ void HackStudioWidget::create_view_menu(GUI::Window& window)
|
|||
create_location_history_actions();
|
||||
view_menu.add_action(*m_locations_history_back_action);
|
||||
view_menu.add_action(*m_locations_history_forward_action);
|
||||
|
||||
auto search_action = GUI::Action::create("&Search", { Mod_Ctrl, Key_F }, [this](auto&) {
|
||||
current_editor_wrapper().search_action();
|
||||
});
|
||||
view_menu.add_action(search_action);
|
||||
}
|
||||
|
||||
void HackStudioWidget::create_help_menu(GUI::Window& window)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue