diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-04 22:39:41 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-04 22:43:43 +0200 |
commit | eff7ea5b8413deede1ce2a7545fa7ca0f0474687 (patch) | |
tree | bccf53d63a07b55f58edf55cc90b94aa6b4b5828 /Userland/Libraries/LibGUI/Action.cpp | |
parent | 578f74979199e1df9e36c5be88c2226f4e7cc1e7 (diff) | |
download | serenity-eff7ea5b8413deede1ce2a7545fa7ca0f0474687.zip |
LibGUI: Add GUI::CommonActions::make_properties_action()
Many apps want a "Properties" action with the same icon and shortcut.
Diffstat (limited to 'Userland/Libraries/LibGUI/Action.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/Action.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Action.cpp b/Userland/Libraries/LibGUI/Action.cpp index 848911849a..fba1c62eb3 100644 --- a/Userland/Libraries/LibGUI/Action.cpp +++ b/Userland/Libraries/LibGUI/Action.cpp @@ -141,6 +141,11 @@ NonnullRefPtr<Action> make_select_all_action(Function<void(Action&)> callback, C return Action::create("Select all", { Mod_Ctrl, Key_A }, Gfx::Bitmap::load_from_file("/res/icons/16x16/select-all.png"), move(callback), parent); } +NonnullRefPtr<Action> make_properties_action(Function<void(Action&)> callback, Core::Object* parent) +{ + return Action::create("Properties", { Mod_Alt, Key_Return }, Gfx::Bitmap::load_from_file("/res/icons/16x16/properties.png"), move(callback), parent); +} + } NonnullRefPtr<Action> Action::create(String text, Function<void(Action&)> callback, Core::Object* parent) |