mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:27:34 +00:00
Browser: Add Alt shortcuts to menu actions
This commit is contained in:
parent
c6c0ec9403
commit
9945135f66
2 changed files with 18 additions and 18 deletions
|
@ -44,35 +44,35 @@ WindowActions::WindowActions(GUI::Window& window)
|
|||
VERIFY(!s_the);
|
||||
s_the = this;
|
||||
m_create_new_tab_action = GUI::Action::create(
|
||||
"New tab", { Mod_Ctrl, Key_T }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [this](auto&) {
|
||||
"&New Tab", { Mod_Ctrl, Key_T }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [this](auto&) {
|
||||
if (on_create_new_tab)
|
||||
on_create_new_tab();
|
||||
},
|
||||
&window);
|
||||
|
||||
m_next_tab_action = GUI::Action::create(
|
||||
"Next tab", { Mod_Ctrl, Key_PageDown }, [this](auto&) {
|
||||
"&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&) {
|
||||
"&Previous Tab", { Mod_Ctrl, Key_PageUp }, [this](auto&) {
|
||||
if (on_previous_tab)
|
||||
on_previous_tab();
|
||||
},
|
||||
&window);
|
||||
|
||||
m_about_action = GUI::Action::create(
|
||||
"About Browser", GUI::Icon::default_icon("app-browser").bitmap_for_size(16), [this](const GUI::Action&) {
|
||||
"&About Browser", GUI::Icon::default_icon("app-browser").bitmap_for_size(16), [this](const GUI::Action&) {
|
||||
if (on_about)
|
||||
on_about();
|
||||
},
|
||||
&window);
|
||||
|
||||
m_show_bookmarks_bar_action = GUI::Action::create_checkable(
|
||||
"Bookmarks bar", { Mod_Ctrl, Key_B },
|
||||
"&Bookmarks Bar", { Mod_Ctrl, Key_B },
|
||||
[this](auto& action) {
|
||||
if (on_show_bookmarks_bar)
|
||||
on_show_bookmarks_bar(action);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue