From 9d8620f9565ee5d308883b57d5f834c90b85e3dd Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 24 Apr 2020 20:22:45 +0200 Subject: [PATCH] Browser: Add icons for the "new tab" and "close tab" actions --- Applications/Browser/Tab.cpp | 2 +- Applications/Browser/WindowActions.cpp | 3 ++- Base/res/icons/16x16/close-tab.png | Bin 0 -> 199 bytes Base/res/icons/16x16/new-tab.png | Bin 0 -> 224 bytes 4 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Base/res/icons/16x16/close-tab.png create mode 100644 Base/res/icons/16x16/new-tab.png diff --git a/Applications/Browser/Tab.cpp b/Applications/Browser/Tab.cpp index 4deea4bdb2..4a7b464d29 100644 --- a/Applications/Browser/Tab.cpp +++ b/Applications/Browser/Tab.cpp @@ -183,7 +183,7 @@ Tab::Tab() auto& app_menu = m_menubar->add_menu("Browser"); app_menu.add_action(WindowActions::the().create_new_tab_action()); - app_menu.add_action(GUI::Action::create("Close tab", { Mod_Ctrl, Key_W }, [this](auto&) { + app_menu.add_action(GUI::Action::create("Close tab", { Mod_Ctrl, Key_W }, Gfx::Bitmap::load_from_file("/res/icons/16x16/close-tab.png"), [this](auto&) { on_tab_close_request(*this); }, this)); diff --git a/Applications/Browser/WindowActions.cpp b/Applications/Browser/WindowActions.cpp index 99f0bc8654..501d0ddc65 100644 --- a/Applications/Browser/WindowActions.cpp +++ b/Applications/Browser/WindowActions.cpp @@ -1,5 +1,6 @@ #include "WindowActions.h" #include +#include namespace Browser { @@ -16,7 +17,7 @@ WindowActions::WindowActions(GUI::Window& window) ASSERT(!s_the); s_the = this; m_create_new_tab_action = GUI::Action::create( - "New tab", { Mod_Ctrl, Key_T }, [this](auto&) { + "New tab", { Mod_Ctrl, Key_T }, Gfx::Bitmap::load_from_file("/res/icons/16x16/new-tab.png"), [this](auto&) { if (on_create_new_tab) on_create_new_tab(); }, diff --git a/Base/res/icons/16x16/close-tab.png b/Base/res/icons/16x16/close-tab.png new file mode 100644 index 0000000000000000000000000000000000000000..9b6a0ae0858fabd1be4671e3587311804184baa1 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7`aE46Lo7}oow!l7L4n6b z-_C8pmIY}NUSSDp;Tz5vToar2uA%p#Vyl~`&r#-g&-ECsx}OL*o%qUZJXz{O*L{aP zM*mQ$8pe*a7qXB3GkoC@WaxPo{3)5OA@k;ny}|As=fna(CHI|sB|B%X>y*WtXIz)P zylLV^s}+h$b)t?r=U>-#CeJfFcqXL#w#Aj*t;{u*9{0cPDN$fxU|{fc^>bP0l+XkK D4~x?$Ch8LnbUvt1MdFYsTw z()t=PgolnbJ`P(~zvXlJxNhG3#`5iQTXO%r{3ZM7ie1Rj$YTQ5yo$3XoMq14 dv--Z3u8M)pUR&L?^9&3O44$rjF6*2UngHoxSd{<( literal 0 HcmV?d00001