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 4deea4bdb20..4a7b464d299 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 99f0bc8654d..501d0ddc65d 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!ia0vp^0wB!61|;P_|4#%`eV#6kAr_~PPTVNkpuppzZ|AmP z%YrlsudoEQ@C|1Su8B>1*U%K!CqkpJW z4P!^z3)x5i8NTocGW0wP{*=ttka=^(-eC8Rb7Fy?lKalRlASZxb;{z+Gp@^C-Zb%| y)e1$WI#I`*^RMeVljoToJQLD=+v3XZR_2;YkNe;DlqdjQ#^CAd=d#Wzp$PyFjZZNE literal 0 HcmV?d00001 diff --git a/Base/res/icons/16x16/new-tab.png b/Base/res/icons/16x16/new-tab.png new file mode 100644 index 0000000000000000000000000000000000000000..48f749ef684937506680797863c7ecbdf1aacc5c GIT binary patch literal 224 zcmV<603ZK}P)$l)yzPfChA871Tm0)It?;v;hhbFDXG>4uJSGg9Hw~)6ORQCGX8FtdtBz zmSy^SP?n|427C^OKqdjd^n73mV3^sg4e|c~)`SRPLN2HIK|vdUs<@a%7Gj%3AW_f{ z(%g;~Mf%?U9$?`?d`v*KtL+X%@vfeqfp@nav~B$9`W@obK2*h7#t=IVA)1iQ18uyk a-#RTMFg(3IEoRRE0000