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).
This commit is contained in:
electrikmilk 2022-02-09 13:57:50 -05:00 committed by Linus Groh
parent 3bfcd7b52d
commit 133a30c8b7
4 changed files with 10 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -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();

View file

@ -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"));

View file

@ -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 };