1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 10:45:09 +00:00

LibGUI: CommonActions: Add make_help_action common action

This commit is contained in:
Brendan Coles 2021-01-02 08:10:48 +00:00 committed by Andreas Kling
parent 7785d9715d
commit 69e3879b7a
2 changed files with 6 additions and 0 deletions

View file

@ -100,6 +100,11 @@ NonnullRefPtr<Action> make_quit_action(Function<void(Action&)> callback)
return Action::create("Quit", { Mod_Alt, Key_F4 }, move(callback));
}
NonnullRefPtr<Action> make_help_action(Function<void(Action&)> callback, Core::Object* parent)
{
return Action::create("Contents", { Mod_None, Key_F1 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/app-help.png"), move(callback), parent);
}
NonnullRefPtr<Action> make_go_back_action(Function<void(Action&)> callback, Core::Object* parent)
{
return Action::create("Go back", { Mod_Alt, Key_Left }, Gfx::Bitmap::load_from_file("/res/icons/16x16/go-back.png"), move(callback), parent);