mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
Base+Browser: Add Browser Icons
Add or insert some missing browser icons.
This commit is contained in:
parent
1b9e98a17d
commit
4bfed6a5ed
8 changed files with 21 additions and 6 deletions
BIN
Base/res/icons/16x16/clear-cache.png
Normal file
BIN
Base/res/icons/16x16/clear-cache.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
Base/res/icons/16x16/history.png
Normal file
BIN
Base/res/icons/16x16/history.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
BIN
Base/res/icons/16x16/layers.png
Normal file
BIN
Base/res/icons/16x16/layers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
Base/res/icons/16x16/spoof.png
Normal file
BIN
Base/res/icons/16x16/spoof.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
Base/res/icons/16x16/trash-can.png
Normal file
BIN
Base/res/icons/16x16/trash-can.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -233,7 +233,7 @@ void BrowserWindow::build_menus()
|
|||
auto& settings_menu = add_menu("&Settings");
|
||||
|
||||
m_change_homepage_action = GUI::Action::create(
|
||||
"Set Homepage URL...", [this](auto&) {
|
||||
"Set Homepage URL...", g_icon_bag.go_home, [this](auto&) {
|
||||
auto homepage_url = Config::read_string("Browser", "Preferences", "Home", "about:blank");
|
||||
if (GUI::InputBox::show(this, homepage_url, "Enter URL", "Change homepage URL") == GUI::InputBox::ExecOK) {
|
||||
if (URL(homepage_url).is_valid()) {
|
||||
|
@ -284,12 +284,12 @@ void BrowserWindow::build_menus()
|
|||
},
|
||||
this));
|
||||
debug_menu.add_action(GUI::Action::create(
|
||||
"Dump &Layout Tree", [this](auto&) {
|
||||
"Dump &Layout Tree", g_icon_bag.layout, [this](auto&) {
|
||||
active_tab().m_web_content_view->debug_request("dump-layout-tree");
|
||||
},
|
||||
this));
|
||||
debug_menu.add_action(GUI::Action::create(
|
||||
"Dump &Stacking Context Tree", [this](auto&) {
|
||||
"Dump &Stacking Context Tree", g_icon_bag.layers, [this](auto&) {
|
||||
active_tab().m_web_content_view->debug_request("dump-stacking-context-tree");
|
||||
},
|
||||
this));
|
||||
|
@ -298,7 +298,7 @@ void BrowserWindow::build_menus()
|
|||
active_tab().m_web_content_view->debug_request("dump-style-sheets");
|
||||
},
|
||||
this));
|
||||
debug_menu.add_action(GUI::Action::create("Dump &History", { Mod_Ctrl, Key_H }, [this](auto&) {
|
||||
debug_menu.add_action(GUI::Action::create("Dump &History", { Mod_Ctrl, Key_H }, g_icon_bag.history, [this](auto&) {
|
||||
active_tab().m_history.dump();
|
||||
}));
|
||||
debug_menu.add_action(GUI::Action::create("Dump C&ookies", g_icon_bag.cookie, [this](auto&) {
|
||||
|
@ -316,10 +316,10 @@ void BrowserWindow::build_menus()
|
|||
debug_menu.add_action(line_box_borders_action);
|
||||
|
||||
debug_menu.add_separator();
|
||||
debug_menu.add_action(GUI::Action::create("Collect &Garbage", { Mod_Ctrl | Mod_Shift, Key_G }, [this](auto&) {
|
||||
debug_menu.add_action(GUI::Action::create("Collect &Garbage", { Mod_Ctrl | Mod_Shift, Key_G }, g_icon_bag.trash_can, [this](auto&) {
|
||||
active_tab().m_web_content_view->debug_request("collect-garbage");
|
||||
}));
|
||||
debug_menu.add_action(GUI::Action::create("Clear &Cache", { Mod_Ctrl | Mod_Shift, Key_C }, [this](auto&) {
|
||||
debug_menu.add_action(GUI::Action::create("Clear &Cache", { Mod_Ctrl | Mod_Shift, Key_C }, g_icon_bag.clear_cache, [this](auto&) {
|
||||
active_tab().m_web_content_view->debug_request("clear-cache");
|
||||
}));
|
||||
|
||||
|
@ -330,6 +330,7 @@ void BrowserWindow::build_menus()
|
|||
});
|
||||
m_disable_user_agent_spoofing->set_status_tip(Web::default_user_agent);
|
||||
spoof_user_agent_menu.add_action(*m_disable_user_agent_spoofing);
|
||||
spoof_user_agent_menu.set_icon(g_icon_bag.spoof);
|
||||
m_user_agent_spoof_actions.add_action(*m_disable_user_agent_spoofing);
|
||||
m_disable_user_agent_spoofing->set_checked(true);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ ErrorOr<IconBag> IconBag::try_create()
|
|||
icon_bag.bookmark_contour = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/bookmark-contour.png"));
|
||||
icon_bag.bookmark_filled = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/bookmark-filled.png"));
|
||||
icon_bag.inspector_object = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object.png"));
|
||||
icon_bag.go_home = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-home.png"));
|
||||
icon_bag.find = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/find.png"));
|
||||
icon_bag.color_chooser = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/color-chooser.png"));
|
||||
icon_bag.delete_icon = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/delete.png"));
|
||||
|
@ -25,8 +26,14 @@ ErrorOr<IconBag> IconBag::try_create()
|
|||
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/16x16/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.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/16x16/cookie.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/16x16/clear-cache.png"));
|
||||
icon_bag.spoof = TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/spoof.png"));
|
||||
|
||||
return icon_bag;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ struct IconBag final {
|
|||
RefPtr<Gfx::Bitmap> bookmark_contour { nullptr };
|
||||
RefPtr<Gfx::Bitmap> bookmark_filled { nullptr };
|
||||
RefPtr<Gfx::Bitmap> inspector_object { nullptr };
|
||||
RefPtr<Gfx::Bitmap> go_home { nullptr };
|
||||
RefPtr<Gfx::Bitmap> find { nullptr };
|
||||
RefPtr<Gfx::Bitmap> color_chooser { nullptr };
|
||||
RefPtr<Gfx::Bitmap> delete_icon { nullptr };
|
||||
|
@ -26,7 +27,13 @@ struct IconBag final {
|
|||
RefPtr<Gfx::Bitmap> duplicate_tab { nullptr };
|
||||
RefPtr<Gfx::Bitmap> code { nullptr };
|
||||
RefPtr<Gfx::Bitmap> tree { nullptr };
|
||||
RefPtr<Gfx::Bitmap> layout { nullptr };
|
||||
RefPtr<Gfx::Bitmap> layers { nullptr };
|
||||
RefPtr<Gfx::Bitmap> inspect { nullptr };
|
||||
RefPtr<Gfx::Bitmap> history { nullptr };
|
||||
RefPtr<Gfx::Bitmap> cookie { nullptr };
|
||||
RefPtr<Gfx::Bitmap> trash_can { nullptr };
|
||||
RefPtr<Gfx::Bitmap> clear_cache { nullptr };
|
||||
RefPtr<Gfx::Bitmap> spoof { nullptr };
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue