1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +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

@ -107,7 +107,7 @@ SamplerWidget::SamplerWidget(AudioEngine& audio_engine)
m_open_button->set_preferred_size(24, 24);
m_open_button->set_focusable(false);
m_open_button->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/open.png"));
m_open_button->on_click = [this] {
m_open_button->on_click = [this](auto) {
Optional<String> open_path = GUI::FilePicker::get_open_filepath();
if (!open_path.has_value())
return;