LibGUI: Add a "reload" action to GCommonActions

This commit is contained in:
Andreas Kling 2019-10-05 10:14:09 +02:00
parent 7dd03b7846
commit 4f47146433
Notes: sideshowbarker 2024-07-19 11:49:03 +09:00
3 changed files with 6 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

View File

@ -71,6 +71,11 @@ NonnullRefPtr<GAction> make_go_forward_action(Function<void(GAction&)> callback,
return GAction::create("Go forward", { Mod_Alt, Key_Right }, GraphicsBitmap::load_from_file("/res/icons/16x16/go-forward.png"), move(callback), widget);
}
NonnullRefPtr<GAction> make_reload_action(Function<void(GAction&)> callback, GWidget* widget)
{
return GAction::create("Reload", { Mod_Ctrl, Key_R }, GraphicsBitmap::load_from_file("/res/icons/16x16/reload.png"), move(callback), widget);
}
}
GAction::GAction(const StringView& text, Function<void(GAction&)> on_activation_callback, GWidget* widget)

View File

@ -32,6 +32,7 @@ NonnullRefPtr<GAction> make_fullscreen_action(Function<void(GAction&)>, GWidget*
NonnullRefPtr<GAction> make_quit_action(Function<void(GAction&)>);
NonnullRefPtr<GAction> make_go_back_action(Function<void(GAction&)>, GWidget* widget = nullptr);
NonnullRefPtr<GAction> make_go_forward_action(Function<void(GAction&)>, GWidget* widget = nullptr);
NonnullRefPtr<GAction> make_reload_action(Function<void(GAction&)>, GWidget* widget = nullptr);
};
class GAction : public RefCounted<GAction>