mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
Browser: Add context menu icons
This adds two new icons for browser context menu items "Close Other Tabs" and "Download". This adds existing icons where they were missing in context menu items.
This commit is contained in:
parent
6193fdb477
commit
6675865582
Notes:
sideshowbarker
2024-07-17 07:21:52 +09:00
Author: https://github.com/electrikmilk
Commit: 6675865582
Pull-request: https://github.com/SerenityOS/serenity/pull/15164
6 changed files with 25 additions and 13 deletions
|
@ -124,7 +124,7 @@ BookmarksBarWidget::BookmarksBarWidget(String const& bookmarks_file, bool enable
|
|||
|
||||
m_context_menu = GUI::Menu::construct();
|
||||
auto default_action = GUI::Action::create(
|
||||
"&Open", [this](auto&) {
|
||||
"&Open", g_icon_bag.go_to, [this](auto&) {
|
||||
if (on_bookmark_click)
|
||||
on_bookmark_click(m_context_menu_url, OpenInNewTab::No);
|
||||
},
|
||||
|
@ -132,14 +132,14 @@ BookmarksBarWidget::BookmarksBarWidget(String const& bookmarks_file, bool enable
|
|||
m_context_menu_default_action = default_action;
|
||||
m_context_menu->add_action(default_action);
|
||||
m_context_menu->add_action(GUI::Action::create(
|
||||
"Open in New &Tab", [this](auto&) {
|
||||
"Open in New &Tab", g_icon_bag.new_tab, [this](auto&) {
|
||||
if (on_bookmark_click)
|
||||
on_bookmark_click(m_context_menu_url, OpenInNewTab::Yes);
|
||||
},
|
||||
this));
|
||||
m_context_menu->add_separator();
|
||||
m_context_menu->add_action(GUI::Action::create(
|
||||
"&Edit...", [this](auto&) {
|
||||
"&Edit...", g_icon_bag.rename, [this](auto&) {
|
||||
edit_bookmark(m_context_menu_url);
|
||||
},
|
||||
this));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue