1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

Browser: Implement zoom :^)

Largely based on the Ladybird implementation in 0cc151b.
This commit is contained in:
Linus Groh 2023-01-12 18:31:14 +00:00
parent 966d808135
commit 36866730ce
Notes: sideshowbarker 2024-07-17 10:10:18 +09:00
3 changed files with 60 additions and 0 deletions

View file

@ -180,6 +180,25 @@ void BrowserWindow::build_menus()
view_menu.add_action(WindowActions::the().show_bookmarks_bar_action());
view_menu.add_action(WindowActions::the().vertical_tabs_action());
view_menu.add_separator();
view_menu.add_action(GUI::CommonActions::make_zoom_in_action(
[this](auto&) {
auto& tab = active_tab();
tab.view().zoom_in();
},
this));
view_menu.add_action(GUI::CommonActions::make_zoom_out_action(
[this](auto&) {
auto& tab = active_tab();
tab.view().zoom_out();
},
this));
view_menu.add_action(GUI::CommonActions::make_reset_zoom_action(
[this](auto&) {
auto& tab = active_tab();
tab.view().reset_zoom();
},
this));
view_menu.add_separator();
view_menu.add_action(GUI::CommonActions::make_fullscreen_action(
[this](auto&) {
auto& tab = active_tab();