diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 22:42:02 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 22:42:39 +0200 |
commit | d754ac5bcb1b20f49285909fa31792c8111424d3 (patch) | |
tree | 73fd5adbee0267d3d4b0d38c0fdf2a3a6d7aaf54 /Libraries/LibGUI/GAction.cpp | |
parent | 92b17eab23b5789714bdc6255566d53b16ce626f (diff) | |
download | serenity-d754ac5bcb1b20f49285909fa31792c8111424d3.zip |
LibGUI+VisualBuilder: Add move-to-front/back to GCommonActions
Also give them nice little icons. :^)
Diffstat (limited to 'Libraries/LibGUI/GAction.cpp')
-rw-r--r-- | Libraries/LibGUI/GAction.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Libraries/LibGUI/GAction.cpp b/Libraries/LibGUI/GAction.cpp index c5df20869b..61b9a775ee 100644 --- a/Libraries/LibGUI/GAction.cpp +++ b/Libraries/LibGUI/GAction.cpp @@ -6,6 +6,16 @@ namespace GCommonActions { +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); +} + +NonnullRefPtr<GAction> make_move_to_back_action(Function<void(GAction&)> callback, GWidget* widget) +{ + return GAction::create("Move to back", { Mod_Ctrl | Mod_Shift, Key_Down }, GraphicsBitmap::load_from_file("/res/icons/16x16/move-to-back.png"), move(callback), widget); +} + NonnullRefPtr<GAction> make_undo_action(Function<void(GAction&)> callback, GWidget* widget) { return GAction::create("Undo", { Mod_Ctrl, Key_Z }, GraphicsBitmap::load_from_file("/res/icons/16x16/undo.png"), move(callback), widget); |