1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:58:12 +00:00

Browser: Allow Ctrl+clicking on bookmark bar buttons :^)

This commit is contained in:
Andreas Kling 2020-05-12 20:35:45 +02:00
parent 977863ea07
commit a87f5e4154
4 changed files with 9 additions and 6 deletions

View file

@ -332,8 +332,11 @@ void Tab::did_become_active()
m_statusbar->set_text(String::format("Loading (%d pending resources...)", Web::ResourceLoader::the().pending_loads()));
};
BookmarksBarWidget::the().on_bookmark_click = [this](auto&, auto& url) {
m_html_widget->load(url);
BookmarksBarWidget::the().on_bookmark_click = [this](auto&, auto& url, unsigned modifiers) {
if (modifiers & Mod_Ctrl)
on_tab_open_request(url);
else
m_html_widget->load(url);
};
BookmarksBarWidget::the().on_bookmark_hover = [this](auto&, auto& url) {