#include #include #include #include #include #include static constexpr ui::Color BACKGROUND_COLOR = ui::Color::from_rgb(89, 89, 89); Result luna_main(int, char**) { ui::App app; TRY(app.init()); auto* window = TRY(ui::Window::create(ui::Rect { 300, 300, 400, 300 })); app.set_main_window(window); window->set_title("About"); window->set_background(BACKGROUND_COLOR); utsname info; uname(&info); ui::VerticalLayout main_layout; window->set_main_widget(main_layout); ui::Label title("About Luna"); title.set_font(ui::Font::default_bold_font()); main_layout.add_widget(title); ui::VerticalLayout version_info; main_layout.add_widget(version_info); ui::Label license("Licensed under the BSD-2-Clause license."); main_layout.add_widget(license); String os_release_text = TRY(String::format("OS release: %s"_sv, info.release)); ui::Label os_release(os_release_text.view()); version_info.add_widget(os_release); String kernel_version_text = TRY(String::format("Kernel version: %s"_sv, info.version)); ui::Label kernel_version(kernel_version_text.view()); version_info.add_widget(kernel_version); return app.run(); }