mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
Browser: Pop up a context menu when one is requested on a tab
Currently, the tab's context menu only has options to reload and close, but this patch allows for those options to be quickly expanded!
This commit is contained in:
parent
bf2e6325a4
commit
9241c3a957
3 changed files with 21 additions and 0 deletions
|
@ -121,6 +121,11 @@ int main(int argc, char** argv)
|
|||
tab.on_tab_close_request(tab);
|
||||
};
|
||||
|
||||
tab_widget.on_context_menu_request = [&](auto& clicked_widget, const GUI::ContextMenuEvent& context_menu_event) {
|
||||
auto& tab = static_cast<Browser::Tab&>(clicked_widget);
|
||||
tab.context_menu_requested(context_menu_event.screen_position());
|
||||
};
|
||||
|
||||
Browser::WindowActions window_actions(*window);
|
||||
|
||||
Function<void(URL url, bool activate)> create_new_tab;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue