summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorGeordie Hall <me@geordiehall.com>2022-02-05 20:10:07 +1100
committerLinus Groh <mail@linusgroh.de>2022-05-30 00:13:27 +0100
commit9a97ffe8837727ce339bada865be1ee08d0d7859 (patch)
tree80244c13e777f9720c7de7e5e97b09de2c08a8a0 /Userland
parent4efcf3cc8e93c20d2f13c06fcc4a00348b9deb85 (diff)
downloadserenity-9a97ffe8837727ce339bada865be1ee08d0d7859.zip
LibGUI: Add side mouse buttons as an alternate shortcut for back/forward
The up/down side mouse buttons will now also trigger the back/forward common actions, as used by the Browser, File Manager etc. This matches standard behaviour of most apps on other operating systems.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGUI/CommonActions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/CommonActions.cpp b/Userland/Libraries/LibGUI/CommonActions.cpp
index 783c2a6b66..3e23795ee4 100644
--- a/Userland/Libraries/LibGUI/CommonActions.cpp
+++ b/Userland/Libraries/LibGUI/CommonActions.cpp
@@ -120,14 +120,14 @@ NonnullRefPtr<Action> make_help_action(Function<void(Action&)> callback, Core::O
NonnullRefPtr<Action> make_go_back_action(Function<void(Action&)> callback, Core::Object* parent)
{
- auto action = Action::create("Go &Back", { Mod_Alt, Key_Left }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-back.png").release_value_but_fixme_should_propagate_errors(), move(callback), parent);
+ auto action = Action::create("Go &Back", { Mod_Alt, Key_Left }, { MouseButton::Backward }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-back.png").release_value_but_fixme_should_propagate_errors(), move(callback), parent);
action->set_status_tip("Move one step backward in history");
return action;
}
NonnullRefPtr<Action> make_go_forward_action(Function<void(Action&)> callback, Core::Object* parent)
{
- auto action = Action::create("Go &Forward", { Mod_Alt, Key_Right }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png").release_value_but_fixme_should_propagate_errors(), move(callback), parent);
+ auto action = Action::create("Go &Forward", { Mod_Alt, Key_Right }, { MouseButton::Forward }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png").release_value_but_fixme_should_propagate_errors(), move(callback), parent);
action->set_status_tip("Move one step forward in history");
return action;
}