mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
Browser: Add Reload option to app menu with F5 shortcut key
This commit is contained in:
parent
2463a285ee
commit
8780151155
1 changed files with 5 additions and 0 deletions
|
@ -227,6 +227,11 @@ int main(int argc, char** argv)
|
|||
auto menubar = make<GUI::MenuBar>();
|
||||
|
||||
auto app_menu = GUI::Menu::construct("Browser");
|
||||
app_menu->add_action(GUI::Action::create("Reload", { Mod_None, Key_F5 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/reload.png"), [&](auto&) {
|
||||
TemporaryChange<bool> change(should_push_loads_to_history, false);
|
||||
html_widget.reload();
|
||||
}));
|
||||
app_menu->add_separator();
|
||||
app_menu->add_action(GUI::CommonActions::make_quit_action([&](auto&) {
|
||||
app.quit();
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue