diff --git a/Base/res/icons/16x16/clear-cache.png b/Base/res/icons/16x16/clear-cache.png new file mode 100644 index 0000000000..a69ce4889d Binary files /dev/null and b/Base/res/icons/16x16/clear-cache.png differ diff --git a/Base/res/icons/16x16/history.png b/Base/res/icons/16x16/history.png new file mode 100644 index 0000000000..b240eac98b Binary files /dev/null and b/Base/res/icons/16x16/history.png differ diff --git a/Base/res/icons/16x16/layers.png b/Base/res/icons/16x16/layers.png new file mode 100644 index 0000000000..acfc7ca521 Binary files /dev/null and b/Base/res/icons/16x16/layers.png differ diff --git a/Base/res/icons/16x16/spoof.png b/Base/res/icons/16x16/spoof.png new file mode 100644 index 0000000000..53ae1a5015 Binary files /dev/null and b/Base/res/icons/16x16/spoof.png differ diff --git a/Base/res/icons/16x16/trash-can.png b/Base/res/icons/16x16/trash-can.png new file mode 100644 index 0000000000..4294d792e8 Binary files /dev/null and b/Base/res/icons/16x16/trash-can.png differ diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index ba84ef87d9..f5866d7666 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -233,7 +233,7 @@ void BrowserWindow::build_menus() auto& settings_menu = add_menu("&Settings"); m_change_homepage_action = GUI::Action::create( - "Set Homepage URL...", [this](auto&) { + "Set Homepage URL...", g_icon_bag.go_home, [this](auto&) { auto homepage_url = Config::read_string("Browser", "Preferences", "Home", "about:blank"); if (GUI::InputBox::show(this, homepage_url, "Enter URL", "Change homepage URL") == GUI::InputBox::ExecOK) { if (URL(homepage_url).is_valid()) { @@ -284,12 +284,12 @@ void BrowserWindow::build_menus() }, this)); debug_menu.add_action(GUI::Action::create( - "Dump &Layout Tree", [this](auto&) { + "Dump &Layout Tree", g_icon_bag.layout, [this](auto&) { active_tab().m_web_content_view->debug_request("dump-layout-tree"); }, this)); debug_menu.add_action(GUI::Action::create( - "Dump &Stacking Context Tree", [this](auto&) { + "Dump &Stacking Context Tree", g_icon_bag.layers, [this](auto&) { active_tab().m_web_content_view->debug_request("dump-stacking-context-tree"); }, this)); @@ -298,7 +298,7 @@ void BrowserWindow::build_menus() active_tab().m_web_content_view->debug_request("dump-style-sheets"); }, this)); - debug_menu.add_action(GUI::Action::create("Dump &History", { Mod_Ctrl, Key_H }, [this](auto&) { + debug_menu.add_action(GUI::Action::create("Dump &History", { Mod_Ctrl, Key_H }, g_icon_bag.history, [this](auto&) { active_tab().m_history.dump(); })); debug_menu.add_action(GUI::Action::create("Dump C&ookies", g_icon_bag.cookie, [this](auto&) { @@ -316,10 +316,10 @@ void BrowserWindow::build_menus() debug_menu.add_action(line_box_borders_action); debug_menu.add_separator(); - debug_menu.add_action(GUI::Action::create("Collect &Garbage", { Mod_Ctrl | Mod_Shift, Key_G }, [this](auto&) { + debug_menu.add_action(GUI::Action::create("Collect &Garbage", { Mod_Ctrl | Mod_Shift, Key_G }, g_icon_bag.trash_can, [this](auto&) { active_tab().m_web_content_view->debug_request("collect-garbage"); })); - debug_menu.add_action(GUI::Action::create("Clear &Cache", { Mod_Ctrl | Mod_Shift, Key_C }, [this](auto&) { + debug_menu.add_action(GUI::Action::create("Clear &Cache", { Mod_Ctrl | Mod_Shift, Key_C }, g_icon_bag.clear_cache, [this](auto&) { active_tab().m_web_content_view->debug_request("clear-cache"); })); @@ -330,6 +330,7 @@ void BrowserWindow::build_menus() }); m_disable_user_agent_spoofing->set_status_tip(Web::default_user_agent); spoof_user_agent_menu.add_action(*m_disable_user_agent_spoofing); + spoof_user_agent_menu.set_icon(g_icon_bag.spoof); m_user_agent_spoof_actions.add_action(*m_disable_user_agent_spoofing); m_disable_user_agent_spoofing->set_checked(true); diff --git a/Userland/Applications/Browser/IconBag.cpp b/Userland/Applications/Browser/IconBag.cpp index d8c4b7a61c..728b80e372 100644 --- a/Userland/Applications/Browser/IconBag.cpp +++ b/Userland/Applications/Browser/IconBag.cpp @@ -18,6 +18,7 @@ ErrorOr IconBag::try_create() icon_bag.bookmark_contour = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/bookmark-contour.png")); icon_bag.bookmark_filled = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/bookmark-filled.png")); icon_bag.inspector_object = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object.png")); + icon_bag.go_home = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-home.png")); icon_bag.find = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/find.png")); icon_bag.color_chooser = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/color-chooser.png")); icon_bag.delete_icon = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/delete.png")); @@ -25,8 +26,14 @@ ErrorOr IconBag::try_create() icon_bag.duplicate_tab = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/duplicate-tab.png")); icon_bag.code = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/code.png")); icon_bag.tree = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/tree.png")); + icon_bag.layout = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/layout.png")); + icon_bag.layers = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/layers.png")); icon_bag.inspect = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspect.png")); + icon_bag.history = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/history.png")); icon_bag.cookie = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/cookie.png")); + icon_bag.trash_can = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/trash-can.png")); + icon_bag.clear_cache = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/clear-cache.png")); + icon_bag.spoof = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/spoof.png")); return icon_bag; } diff --git a/Userland/Applications/Browser/IconBag.h b/Userland/Applications/Browser/IconBag.h index bf33803b79..864583c5f5 100644 --- a/Userland/Applications/Browser/IconBag.h +++ b/Userland/Applications/Browser/IconBag.h @@ -19,6 +19,7 @@ struct IconBag final { RefPtr bookmark_contour { nullptr }; RefPtr bookmark_filled { nullptr }; RefPtr inspector_object { nullptr }; + RefPtr go_home { nullptr }; RefPtr find { nullptr }; RefPtr color_chooser { nullptr }; RefPtr delete_icon { nullptr }; @@ -26,7 +27,13 @@ struct IconBag final { RefPtr duplicate_tab { nullptr }; RefPtr code { nullptr }; RefPtr tree { nullptr }; + RefPtr layout { nullptr }; + RefPtr layers { nullptr }; RefPtr inspect { nullptr }; + RefPtr history { nullptr }; RefPtr cookie { nullptr }; + RefPtr trash_can { nullptr }; + RefPtr clear_cache { nullptr }; + RefPtr spoof { nullptr }; }; }