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

Userland: Use non-fallible EventReceiver::add() where possible

This commit is contained in:
Tim Ledbetter 2023-09-22 22:28:59 +01:00 committed by Andreas Kling
parent 707ca984bd
commit b4e134cb52
54 changed files with 934 additions and 934 deletions

View file

@ -47,9 +47,9 @@ ErrorOr<GUI::Widget*> PickerTool::get_properties_widget()
auto properties_widget = GUI::Widget::construct();
properties_widget->set_layout<GUI::VerticalBoxLayout>();
auto sample_checkbox = TRY(properties_widget->try_add<GUI::CheckBox>("Sample all layers"_string));
sample_checkbox->set_checked(m_sample_all_layers);
sample_checkbox->on_checked = [this](bool value) {
auto& sample_checkbox = properties_widget->add<GUI::CheckBox>("Sample all layers"_string);
sample_checkbox.set_checked(m_sample_all_layers);
sample_checkbox.on_checked = [this](bool value) {
m_sample_all_layers = value;
};
m_properties_widget = properties_widget;