Base: Adjust serenity-application template with some cpp-gui pieces

Namely, the window title and size are carried over, since a larger
window with a more readable "Example Application" title is better to
understand. I also took the opportunity to add a missing trailing
newline to the generated CMake file.
This commit is contained in:
kleines Filmröllchen 2023-03-07 23:12:43 +01:00 committed by Ali Mohammad Pur
parent 7a0fae7be1
commit 2451e97a11
2 changed files with 3 additions and 2 deletions

View file

@ -25,4 +25,5 @@ serenity_app($1 ICON filetype-executable)
# identify each library by their include path. An exception is LibCore, which
# is linked to all components by default.
target_link_libraries($1 LibGUI LibGfx LibMain)
EOF

View file

@ -16,8 +16,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
auto window = TRY(GUI::Window::try_create());
window->set_title("Form1");
window->resize(96, 44);
window->set_title("Example Application");
window->resize(200, 200);
window->set_resizable(false);
auto main_widget = TRY(window->set_main_widget<GUI::Widget>());