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

LibGUI: Use new DialogButton for consistency

This commit is contained in:
FrHun 2022-06-10 23:03:11 +02:00 committed by Linus Groh
parent 4c84e64b2a
commit 992ff4bd63
8 changed files with 18 additions and 34 deletions

View file

@ -232,16 +232,14 @@ void ColorPicker::build_ui()
button_container.layout()->set_spacing(4);
button_container.layout()->add_spacer();
auto& ok_button = button_container.add<Button>();
ok_button.set_fixed_width(80);
auto& ok_button = button_container.add<DialogButton>();
ok_button.set_text("OK");
ok_button.on_click = [this](auto) {
done(ExecResult::OK);
};
ok_button.set_default(true);
auto& cancel_button = button_container.add<Button>();
cancel_button.set_fixed_width(80);
auto& cancel_button = button_container.add<DialogButton>();
cancel_button.set_text("Cancel");
cancel_button.on_click = [this](auto) {
done(ExecResult::Cancel);