Browser: Add Reload option to app menu with F5 shortcut key

This commit is contained in:
Brendan Coles 2020-04-04 09:37:51 +00:00 committed by Andreas Kling
commit 8780151155
Notes: sideshowbarker 2024-07-19 07:57:33 +09:00

View file

@ -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();
}));