diff options
author | Linus Groh <mail@linusgroh.de> | 2023-01-12 18:31:14 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-12 18:52:32 +0000 |
commit | 36866730cea7d3868fb49de88ce2d2844beb885a (patch) | |
tree | 890d8f5bd6c6cf783a682090db3fc9e05a9d12dc /Userland/Applications/Browser/BrowserWindow.cpp | |
parent | 966d808135c03d16b1be65df7ca028ae7813476d (diff) | |
download | serenity-36866730cea7d3868fb49de88ce2d2844beb885a.zip |
Browser: Implement zoom :^)
Largely based on the Ladybird implementation in 0cc151b.
Diffstat (limited to 'Userland/Applications/Browser/BrowserWindow.cpp')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 82ae620b72..298287b320 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -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(); |