mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
Base: Update serenity-application template so that it compiles
This commit is contained in:
parent
78ebeb6a5a
commit
e7a5a2e146
Notes:
sideshowbarker
2024-07-17 04:09:56 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/e7a5a2e146 Pull-request: https://github.com/SerenityOS/serenity/pull/21097
1 changed files with 2 additions and 3 deletions
|
@ -5,7 +5,6 @@
|
|||
#include <LibGUI/Frame.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <unistd.h>
|
||||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
|
@ -23,9 +22,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());
|
||||
main_widget->set_fill_with_background_color(true);
|
||||
|
||||
TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>(16));
|
||||
main_widget->set_layout<GUI::VerticalBoxLayout>(16);
|
||||
|
||||
auto button = TRY(main_widget->try_add<GUI::Button>("Click me!"));
|
||||
auto button = TRY(main_widget->try_add<GUI::Button>("Click me!"_string));
|
||||
button->on_click = [&](auto) {
|
||||
GUI::MessageBox::show(window, "Hello friends!"sv, ":^)"sv);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue