mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Browser: Add context menu item for selecting all text
This commit is contained in:
parent
ae910e4370
commit
615a1c7210
3 changed files with 12 additions and 0 deletions
|
@ -189,6 +189,15 @@ void BrowserWindow::build_menus()
|
|||
GUI::Clipboard::the().set_plain_text(selected_text);
|
||||
});
|
||||
|
||||
m_select_all_action = GUI::CommonActions::make_select_all_action([this](auto&) {
|
||||
auto& tab = active_tab();
|
||||
|
||||
if (tab.m_type == Tab::Type::InProcessWebView)
|
||||
tab.m_page_view->select_all();
|
||||
else
|
||||
tab.m_web_content_view->select_all();
|
||||
});
|
||||
|
||||
m_view_source_action = GUI::Action::create(
|
||||
"View &Source", { Mod_Ctrl, Key_U }, [this](auto&) {
|
||||
auto& tab = active_tab();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue