mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibGUI: Add Undo/Redo to GCommonActions
This commit is contained in:
parent
e83390387c
commit
b41b5433f4
Notes:
sideshowbarker
2024-07-19 12:06:33 +09:00
Author: https://github.com/awesomekling
Commit: b41b5433f4
3 changed files with 18 additions and 12 deletions
|
@ -6,6 +6,16 @@
|
|||
|
||||
namespace GCommonActions {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
NonnullRefPtr<GAction> make_redo_action(Function<void(GAction&)> callback, GWidget* widget)
|
||||
{
|
||||
return GAction::create("Redo", { Mod_Ctrl, Key_Y }, GraphicsBitmap::load_from_file("/res/icons/16x16/redo.png"), move(callback), widget);
|
||||
}
|
||||
|
||||
NonnullRefPtr<GAction> make_delete_action(Function<void(GAction&)> callback, GWidget* widget)
|
||||
{
|
||||
return GAction::create("Delete", { Mod_None, Key_Delete }, GraphicsBitmap::load_from_file("/res/icons/16x16/delete.png"), move(callback), widget);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue