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.
This commit is contained in:
parent
4efcf3cc8e
commit
9a97ffe883
Notes:
sideshowbarker
2024-07-17 12:02:22 +09:00
Author: https://github.com/geordiemhall Commit: https://github.com/SerenityOS/serenity/commit/9a97ffe883 Pull-request: https://github.com/SerenityOS/serenity/pull/12291 Reviewed-by: https://github.com/AtkinsSJ Reviewed-by: https://github.com/bgianfo
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
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");
|
action->set_status_tip("Move one step backward in history");
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
NonnullRefPtr<Action> make_go_forward_action(Function<void(Action&)> callback, Core::Object* parent)
|
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");
|
action->set_status_tip("Move one step forward in history");
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue