summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Action.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-04 22:39:41 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-04 22:43:43 +0200
commiteff7ea5b8413deede1ce2a7545fa7ca0f0474687 (patch)
treebccf53d63a07b55f58edf55cc90b94aa6b4b5828 /Userland/Libraries/LibGUI/Action.cpp
parent578f74979199e1df9e36c5be88c2226f4e7cc1e7 (diff)
downloadserenity-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.cpp5
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)