summaryrefslogtreecommitdiff
path: root/Demos/HelloWorld
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-23 10:57:42 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-23 11:10:52 +0100
commit3d20da9ee451460b6e233f5efdf5a13e11525f97 (patch)
tree524b72d0874304c68036dbbc0514b632a4a08c59 /Demos/HelloWorld
parent7ec758773cdd85755d91f52614f361e7e750c7e9 (diff)
downloadserenity-3d20da9ee451460b6e233f5efdf5a13e11525f97.zip
Userspace: Use Core::Object::add() when building interfaces
Diffstat (limited to 'Demos/HelloWorld')
-rw-r--r--Demos/HelloWorld/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/HelloWorld/main.cpp b/Demos/HelloWorld/main.cpp
index f576d03f3c..1abcd55738 100644
--- a/Demos/HelloWorld/main.cpp
+++ b/Demos/HelloWorld/main.cpp
@@ -46,10 +46,10 @@ int main(int argc, char** argv)
main_widget->set_layout(make<GUI::VerticalBoxLayout>());
main_widget->layout()->set_margins({ 4, 4, 4, 4 });
- auto label = GUI::Label::construct(main_widget);
+ auto label = main_widget->add<GUI::Label>();
label->set_text("Hello\nWorld!");
- auto button = GUI::Button::construct(main_widget);
+ auto button = main_widget->add<GUI::Button>();
button->set_text("Good-bye");
button->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
button->set_preferred_size(0, 20);