mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
Browser: Add Reload option to app menu with F5 shortcut key
This commit is contained in:
parent
2463a285ee
commit
8780151155
Notes:
sideshowbarker
2024-07-19 07:57:33 +09:00
Author: https://github.com/bcoles
Commit: 8780151155
Pull-request: https://github.com/SerenityOS/serenity/pull/1617
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