1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

GCommonActions: Add "Open..." action

Make use of this in PaintBrush and TextEditor. :^)
This commit is contained in:
Andreas Kling 2019-09-20 19:36:39 +02:00
parent 48b1b55629
commit 74c4e62659
4 changed files with 8 additions and 2 deletions

View file

@ -6,6 +6,11 @@
namespace GCommonActions {
NonnullRefPtr<GAction> make_open_action(Function<void(GAction&)> callback, GWidget* widget)
{
return GAction::create("Open...", { Mod_Ctrl, Key_O }, GraphicsBitmap::load_from_file("/res/icons/16x16/open.png"), move(callback), widget);
}
NonnullRefPtr<GAction> make_move_to_front_action(Function<void(GAction&)> callback, GWidget* widget)
{
return GAction::create("Move to front", { Mod_Ctrl | Mod_Shift, Key_Up }, GraphicsBitmap::load_from_file("/res/icons/16x16/move-to-front.png"), move(callback), widget);