mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:04:59 +00:00
Browser: Add a custom icon for the "New Window" action
This commit is contained in:
parent
19494b436b
commit
be80ac619f
4 changed files with 3 additions and 1 deletions
BIN
Base/res/icons/16x16/new-window.png
Normal file
BIN
Base/res/icons/16x16/new-window.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
|
@ -26,6 +26,7 @@ ErrorOr<IconBag> IconBag::try_create()
|
|||
icon_bag.new_tab = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new-tab.png"sv));
|
||||
icon_bag.duplicate_tab = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/duplicate-tab.png"sv));
|
||||
icon_bag.close_other_tabs = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/close-other-tabs.png"sv));
|
||||
icon_bag.new_window = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new-window.png"sv));
|
||||
icon_bag.code = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/code.png"sv));
|
||||
icon_bag.dom_tree = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/browser/dom-tree.png"sv));
|
||||
icon_bag.layout = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/layout.png"sv));
|
||||
|
|
|
@ -27,6 +27,7 @@ struct IconBag final {
|
|||
RefPtr<Gfx::Bitmap> new_tab { nullptr };
|
||||
RefPtr<Gfx::Bitmap> duplicate_tab { nullptr };
|
||||
RefPtr<Gfx::Bitmap> close_other_tabs { nullptr };
|
||||
RefPtr<Gfx::Bitmap> new_window { nullptr };
|
||||
RefPtr<Gfx::Bitmap> code { nullptr };
|
||||
RefPtr<Gfx::Bitmap> dom_tree { nullptr };
|
||||
RefPtr<Gfx::Bitmap> layout { nullptr };
|
||||
|
|
|
@ -34,7 +34,7 @@ WindowActions::WindowActions(GUI::Window& window)
|
|||
m_create_new_tab_action->set_status_tip("Open a new tab");
|
||||
|
||||
m_create_new_window_action = GUI::Action::create(
|
||||
"&New Window", { Mod_Ctrl, Key_N }, g_icon_bag.go_to, [this](auto&) {
|
||||
"&New Window", { Mod_Ctrl, Key_N }, g_icon_bag.new_window, [this](auto&) {
|
||||
if (on_create_new_window) {
|
||||
on_create_new_window();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue