1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 11:35:06 +00:00

LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients

This commit is contained in:
Andreas Kling 2020-03-04 09:46:23 +01:00
parent 4697195645
commit 0f3e57a6fb
37 changed files with 203 additions and 246 deletions

View file

@ -92,10 +92,8 @@ int main(int argc, char** argv)
window->set_title("UserName");
window->set_window_type(GUI::WindowType::MenuApplet);
auto widget = UserNameWidget::construct();
window->resize(widget->get_width(), 16);
window->set_main_widget(widget);
auto& widget = window->set_main_widget<UserNameWidget>();
window->resize(widget.get_width(), 16);
window->show();
if (pledge("stdio shared_buffer rpath", nullptr) < 0) {