Luna/apps/taskbar.cpp

24 lines
557 B
C++
Raw Normal View History

#include <ui/App.h>
#include <ui/Layout.h>
Result<int> luna_main(int argc, char** argv)
{
ui::App app;
TRY(app.init(argc, argv));
ui::Rect screen = app.screen_rect();
ui::Rect bar = ui::Rect { ui::Point { 0, screen.height - 50 }, screen.width, 50 };
auto window = TRY(ui::Window::create(bar, false));
app.set_main_window(window);
window->set_background(ui::GRAY);
ui::HorizontalLayout layout(ui::AdjustHeight::Yes, ui::AdjustWidth::No);
window->set_main_widget(layout);
window->draw();
return app.run();
}