mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
LibGUI: Use default buttons in ColorPicker and FontPicker
This commit is contained in:
parent
c317275425
commit
5f89369f67
2 changed files with 2 additions and 0 deletions
|
@ -238,6 +238,7 @@ void ColorPicker::build_ui()
|
||||||
ok_button.on_click = [this](auto) {
|
ok_button.on_click = [this](auto) {
|
||||||
done(ExecResult::OK);
|
done(ExecResult::OK);
|
||||||
};
|
};
|
||||||
|
ok_button.set_default(true);
|
||||||
|
|
||||||
auto& cancel_button = button_container.add<Button>();
|
auto& cancel_button = button_container.add<Button>();
|
||||||
cancel_button.set_fixed_width(80);
|
cancel_button.set_fixed_width(80);
|
||||||
|
|
|
@ -161,6 +161,7 @@ FontPicker::FontPicker(Window* parent_window, Gfx::Font const* current_font, boo
|
||||||
ok_button.on_click = [this](auto) {
|
ok_button.on_click = [this](auto) {
|
||||||
done(ExecResult::OK);
|
done(ExecResult::OK);
|
||||||
};
|
};
|
||||||
|
ok_button.set_default(true);
|
||||||
|
|
||||||
auto& cancel_button = *widget.find_descendant_of_type_named<GUI::Button>("cancel_button");
|
auto& cancel_button = *widget.find_descendant_of_type_named<GUI::Button>("cancel_button");
|
||||||
cancel_button.on_click = [this](auto) {
|
cancel_button.on_click = [this](auto) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue