mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 05:39:02 +00:00
Userspace: Use Core::Object::add() when building interfaces
This commit is contained in:
parent
7ec758773c
commit
3d20da9ee4
Notes:
sideshowbarker
2024-07-19 09:08:47 +09:00
Author: https://github.com/awesomekling
Commit: 3d20da9ee4
87 changed files with 403 additions and 438 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue