From 133a30c8b728d00fcd1c9969a2f8e556432074f6 Mon Sep 17 00:00:00 2001 From: electrikmilk Date: Wed, 9 Feb 2022 13:57:50 -0500 Subject: [PATCH] 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). --- Base/res/icons/browser/local-storage.png | Bin 0 -> 3094 bytes Userland/Applications/Browser/BrowserWindow.cpp | 8 ++++---- Userland/Applications/Browser/IconBag.cpp | 4 +++- Userland/Applications/Browser/IconBag.h | 4 +++- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 Base/res/icons/browser/local-storage.png diff --git a/Base/res/icons/browser/local-storage.png b/Base/res/icons/browser/local-storage.png new file mode 100644 index 0000000000000000000000000000000000000000..5c9b3140fb684abd26ce5a4910e5bb8b5e427bbe GIT binary patch literal 3094 zcmcIm&2QX96kn)RK~W{dhZGeFEEiBKb=Dq#+v+wX*))m7mMGaka_e|J-dNrBxVDqs z-~cx+5f{V_Ar4$QaD)R~IKqKHfddjJr1XvLbvCd`(?X-{u08KJ?`wYVz4>_c z&eG*eS1vUgjms;`?KSv)QGA}e2;Xn~c|_pn`DA%3YcyVXS$v*p9DY6n55uUtnQwO9 z^(Y@SNx*&991RjcHySr*M+u?#ST6aj7sW04kMF*hr6_30ADA7rlPs|9Xn8+n>-%@Q zbpIZ819|qAbaUi^f&t5kG#d2d%p0}jLaztUVp)-;0+Qcr$#cS>wAope7I?}eyNMB1 zRaLUxCJTt>>mi{xBu&+@g5lpr*!DEt!>&~Q$zU)ILT{~oyD|rFEqOc76Hifw!(nr% zH+kAqutswtX=0D-c-I42_%XIIA>+AO1Kl;jbQC83e{d?#% zDkL>D@fK1>a-McM?~m!TI`&P{^d^?BbqI}O;q7%1dbNeMNzPg_P)S27Myk=phNo$s zW+Bz|RJDY5fS&=$$s`!?t^ljHhn*8(9z@~ZBcTEHLY@u?99=XZJ*FgaudvqXcq?(1 zlbEuVc1s3Vn^6>au1bid`!>>DM@5F|8^|{>Lz-(lq3&4N!PIy3`H*v9|Zp2lEUczHjQSv0Vlhi2Dy=QeOVy$* z32J!Y2}DIiF}7q}Ep7^4_jk%gTZ2BKDp-71@~ub6kHs5t1g8O66y)*>SJ$D{flHQY z>SndR8jV6&36eT82Ocm02KH z%h41roGK^&rFNC?VxE_cOA4w)50G=$7T{#HN}%4t}chP?!3+;GWF+Dz$W*#61RsOOc;E9MuhoZn_4dy2_B@_yHom zV?j6&2@WyLDq~tWQ~SqL4~O!2m!%W*N=Qmz{IWD_$zjR|5=oMNM2i|zcH^KLX>|ol zIhT(6)v0L~XKQ7tr7>t>PSesrwsablj>UFa#DQqK0iKu%m8!E~_%_fhd! z--Y3&zD=_jI#CLD<-0F+Q@Cd@uC(X6&L{NmqodgiZ$0?v;Nakk_cuPfv3|&Z4}*jI zzx?_ee&wgHzJBxC5A9EX{_%l-Vde;+S1x`@-nl=ct{uL1{jX;m8w9`ldiL$x;^w}x Mc&Gi%{M`>90+#ySLjV8( literal 0 HcmV?d00001 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::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 new_tab { nullptr }; RefPtr duplicate_tab { nullptr }; RefPtr code { nullptr }; - RefPtr tree { nullptr }; + RefPtr dom_tree { nullptr }; RefPtr layout { nullptr }; RefPtr layers { nullptr }; + RefPtr filetype_css { nullptr }; RefPtr inspect { nullptr }; RefPtr history { nullptr }; RefPtr cookie { nullptr }; + RefPtr local_storage { nullptr }; RefPtr trash_can { nullptr }; RefPtr clear_cache { nullptr }; RefPtr spoof { nullptr };