1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

LibGUI: Include keyboard modifier state with button on_click calls

This will allow you us to implement special behavior when Ctrl+clicking
a button.
This commit is contained in:
Andreas Kling 2020-05-12 20:30:33 +02:00
parent 3a905aed06
commit 977863ea07
37 changed files with 76 additions and 76 deletions

View file

@ -118,7 +118,7 @@ Tab::Tab()
m_bookmark_button->set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
m_bookmark_button->set_preferred_size(22, 22);
m_bookmark_button->on_click = [this] {
m_bookmark_button->on_click = [this](auto) {
auto url = m_html_widget->main_frame().document()->url().to_string();
if (BookmarksBarWidget::the().contains_bookmark(url)) {
BookmarksBarWidget::the().remove_bookmark(url);