1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:08:11 +00:00

Browser: Use GUI::CommonActions::make_about_action()

Browser had bespoke code for showing the exact same AboutDialog, in a
more convoluted way.
This commit is contained in:
Sam Atkins 2023-02-02 16:17:57 +00:00 committed by Sam Atkins
parent 900cd78121
commit c2082b45ee
3 changed files with 1 additions and 15 deletions

View file

@ -20,8 +20,6 @@
#include <LibCore/DateTime.h>
#include <LibCore/StandardPaths.h>
#include <LibCore/Stream.h>
#include <LibCore/Version.h>
#include <LibGUI/AboutDialog.h>
#include <LibGUI/Application.h>
#include <LibGUI/Clipboard.h>
#include <LibGUI/Icon.h>
@ -131,11 +129,6 @@ BrowserWindow::BrowserWindow(CookieJar& cookie_jar, URL url)
m_tab_widget->activate_last_tab();
});
m_window_actions.on_about = [this] {
auto app_icon = GUI::Icon::default_icon("app-browser"sv);
GUI::AboutDialog::show("Browser"sv, Core::Version::read_long_version_string(), app_icon.bitmap_for_size(32), this);
};
m_window_actions.on_show_bookmarks_bar = [](auto& action) {
Browser::BookmarksBarWidget::the().set_visible(action.is_checked());
Config::write_bool("Browser"sv, "Preferences"sv, "ShowBookmarksBar"sv, action.is_checked());