1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 18:35:07 +00:00

GButton: Convert most code to using ObjectPtr for GButton

This commit is contained in:
Andreas Kling 2019-09-21 19:28:28 +02:00
parent 55a6e4ac0b
commit 45cfd57f6e
20 changed files with 38 additions and 38 deletions

View file

@ -86,7 +86,7 @@ void GMessageBox::build()
button_container->layout()->set_margins({ 15, 0, 15, 0 });
if (should_include_ok_button()) {
auto* ok_button = new GButton(button_container);
auto ok_button = GButton::construct(button_container);
ok_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
ok_button->set_preferred_size(0, 20);
ok_button->set_text("OK");
@ -97,7 +97,7 @@ void GMessageBox::build()
}
if (should_include_cancel_button()) {
auto* cancel_button = new GButton(button_container);
auto cancel_button = GButton::construct(button_container);
cancel_button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
cancel_button->set_preferred_size(0, 20);
cancel_button->set_text("Cancel");