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 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0WWg+Z8+Vb&Z8 z1_ti(%#etZ2wxwokg&dz0$52&wylyQ$U=n(-v9;Y{GwC^b3H@dWCH^O1#?Ti)RaV{B;&NiWE}+~ z10zFyLqmN-b6rDoDGe1uOWMX1cerbuV zk`mO|irfOYv3bSNkV?+a)vrh_&^OdG0Qm~+-IQdwx`NW89I)jn$@-}|sky0nCB^!N zdWLYd6}bhzzHsGOjm^!4t1d2aEi1vVx;Uh=AXPsowK%`DC^^-&EH$r08RmoHlAu&X z&|tL;ReMls8eDThMt(_taYjClK!8i51Vu?^8V(CVGAK$@D>88?1zt7K$gWTb0gsB2&nVrXJz zWMpMzrfXnoWnchN>YG}Un37nMh^*L1*T52_*udP%&;mtqeoAIqB|)Vr$yRCkMY)M3 zwn~|~iRr2O1$pUU+kAbkJoAc667!N%JzZ>-Dsl_-GBZ=GEDaJ9&5V=Gb&V}840KIQ zlT37zObk?gzFSRH$Ss}>XNdYRTqyS19R{lkqsd*)dpv-8iWC#_E0Hy1kQi!0rk%57M zfxaP#gvv(}kVi;|=4F=HDj6v$fD)G#*r~wp5fXs^2oCuf9+|<0{ z%=|oCB||f0nMhO_P{{|%&Q>0o#U=SgmC%AIIJFSU%E?p!=U}VEWQZ4%K}k6^MF}dL zi6t!%7wQmW%QI5*@FsAGvf})-lJdl&RLAtxyb>a^kUlQw7blkCcYLy`rLl3ck-2WN zfuX6cNt&63Zj!livaV60v6)$taiV#$ktNLYSRHR_Wnc`;aO6228nnq7iFxU%DYi=b zO5}UTz%nJ#*woTQH`&-ARoBEKDMdFi$-+$6C^6AI*)Yw}I4#ixn|H95A2jz)a(-S} zYEcOyh6)mk5_3~aQj3ahmC}mxa}^Q`3UV@&!Ff!-EH4FGrNMKsLP@>?qP)TxY$>Tl znMmmX*%r7H6sTw)!Bj_F@d*ikyyKDgpXDk&g*7f4vTfno<-TU%i( z6NpWRL8)n0DMwxCn+mf#p0NkoC+!=i=kzUQ(`)lm6K_Qy&khL zOfoeywMf)8NHtHz`)?@>Eak-(VP6| z|9^XC)rQu_#>RzVp;L8&XXW2dOKB{;bnCXE$eC4ZR5Xse^qoD?ki;zU|Nnn`DYnIl j4uuj1L9?VazcDd{CK`&$6>m}lwcI^j{an^LB{Ts5mipa8 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 };