diff options
author | electrikmilk <brandonjordan124@gmail.com> | 2022-02-09 13:57:50 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-02-09 21:00:37 +0000 |
commit | 133a30c8b728d00fcd1c9969a2f8e556432074f6 (patch) | |
tree | 7b6bd55f85e61f65f3ddb48de70dcba8e8300f96 /Userland/Applications/Browser | |
parent | 3bfcd7b52d6fbbe780ac6ee03d5e5505f8009341 (diff) | |
download | serenity-133a30c8b728d00fcd1c9969a2f8e556432074f6.zip |
Base+Browser: Add browser icons
Add local storage and style sheet icons. I also noticed the name of the
DOM tree icon needed updated (tree => dom_tree).
Diffstat (limited to 'Userland/Applications/Browser')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 8 | ||||
-rw-r--r-- | Userland/Applications/Browser/IconBag.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/Browser/IconBag.h | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index f154b0b32b..b75ac99b75 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -205,7 +205,7 @@ void BrowserWindow::build_menus() m_view_source_action->set_status_tip("View source code of the current page"); m_inspect_dom_tree_action = GUI::Action::create( - "Inspect &DOM Tree", { Mod_None, Key_F12 }, g_icon_bag.tree, [this](auto&) { + "Inspect &DOM Tree", { Mod_None, Key_F12 }, g_icon_bag.dom_tree, [this](auto&) { active_tab().show_inspector_window(Tab::InspectorTarget::Document); }, this); @@ -279,7 +279,7 @@ void BrowserWindow::build_menus() auto& debug_menu = add_menu("&Debug"); debug_menu.add_action(GUI::Action::create( - "Dump &DOM Tree", g_icon_bag.tree, [this](auto&) { + "Dump &DOM Tree", g_icon_bag.dom_tree, [this](auto&) { active_tab().m_web_content_view->debug_request("dump-dom-tree"); }, this)); @@ -294,7 +294,7 @@ void BrowserWindow::build_menus() }, this)); debug_menu.add_action(GUI::Action::create( - "Dump &Style Sheets", [this](auto&) { + "Dump &Style Sheets", g_icon_bag.filetype_css, [this](auto&) { active_tab().m_web_content_view->debug_request("dump-style-sheets"); }, this)); @@ -306,7 +306,7 @@ void BrowserWindow::build_menus() if (tab.on_dump_cookies) tab.on_dump_cookies(); })); - debug_menu.add_action(GUI::Action::create("Dump Loc&al Storage", [this](auto&) { + debug_menu.add_action(GUI::Action::create("Dump Loc&al Storage", g_icon_bag.local_storage, [this](auto&) { active_tab().m_web_content_view->debug_request("dump-local-storage"); })); debug_menu.add_separator(); diff --git a/Userland/Applications/Browser/IconBag.cpp b/Userland/Applications/Browser/IconBag.cpp index 330f71225e..de7abafd4e 100644 --- a/Userland/Applications/Browser/IconBag.cpp +++ b/Userland/Applications/Browser/IconBag.cpp @@ -25,12 +25,14 @@ ErrorOr<IconBag> IconBag::try_create() icon_bag.new_tab = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new-tab.png")); 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/browser/dom-tree.png")); + icon_bag.dom_tree = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/browser/dom-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.filetype_css = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-css.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/browser/cookie.png")); + icon_bag.local_storage = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/browser/local-storage.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/browser/clear-cache.png")); icon_bag.spoof = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/spoof.png")); diff --git a/Userland/Applications/Browser/IconBag.h b/Userland/Applications/Browser/IconBag.h index 864583c5f5..08a56c6a4a 100644 --- a/Userland/Applications/Browser/IconBag.h +++ b/Userland/Applications/Browser/IconBag.h @@ -26,12 +26,14 @@ struct IconBag final { RefPtr<Gfx::Bitmap> new_tab { nullptr }; RefPtr<Gfx::Bitmap> duplicate_tab { nullptr }; RefPtr<Gfx::Bitmap> code { nullptr }; - RefPtr<Gfx::Bitmap> tree { nullptr }; + RefPtr<Gfx::Bitmap> dom_tree { nullptr }; RefPtr<Gfx::Bitmap> layout { nullptr }; RefPtr<Gfx::Bitmap> layers { nullptr }; + RefPtr<Gfx::Bitmap> filetype_css { nullptr }; RefPtr<Gfx::Bitmap> inspect { nullptr }; RefPtr<Gfx::Bitmap> history { nullptr }; RefPtr<Gfx::Bitmap> cookie { nullptr }; + RefPtr<Gfx::Bitmap> local_storage { nullptr }; RefPtr<Gfx::Bitmap> trash_can { nullptr }; RefPtr<Gfx::Bitmap> clear_cache { nullptr }; RefPtr<Gfx::Bitmap> spoof { nullptr }; |