mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +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:
parent
3a905aed06
commit
977863ea07
37 changed files with 76 additions and 76 deletions
|
@ -149,16 +149,16 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
|
|||
|
||||
button_widget.layout()->add_spacer();
|
||||
|
||||
make_button("OK", button_widget).on_click = [this] {
|
||||
make_button("OK", button_widget).on_click = [this](auto) {
|
||||
if (apply_changes())
|
||||
close();
|
||||
};
|
||||
make_button("Cancel", button_widget).on_click = [this] {
|
||||
make_button("Cancel", button_widget).on_click = [this](auto) {
|
||||
close();
|
||||
};
|
||||
|
||||
m_apply_button = make_button("Apply", button_widget);
|
||||
m_apply_button->on_click = [this] { apply_changes(); };
|
||||
m_apply_button->on_click = [this](auto) { apply_changes(); };
|
||||
m_apply_button->set_enabled(false);
|
||||
|
||||
update();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue