mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Browser: Add "next tab" and "previous tab" actions
Now you can switch between the open tabs with Ctrl+PgUp and Ctrl+PgDn
This commit is contained in:
parent
4087e3cfb9
commit
1b8b492258
3 changed files with 28 additions and 0 deletions
|
@ -21,6 +21,20 @@ WindowActions::WindowActions(GUI::Window& window)
|
|||
on_create_new_tab();
|
||||
},
|
||||
&window);
|
||||
|
||||
m_next_tab_action = GUI::Action::create(
|
||||
"Next tab", { Mod_Ctrl, Key_PageDown }, [this](auto&) {
|
||||
if (on_next_tab)
|
||||
on_next_tab();
|
||||
},
|
||||
&window);
|
||||
|
||||
m_previous_tab_action = GUI::Action::create(
|
||||
"Previous tab", { Mod_Ctrl, Key_PageUp }, [this](auto&) {
|
||||
if (on_previous_tab)
|
||||
on_previous_tab();
|
||||
},
|
||||
&window);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue