diff options
author | Andreas Kling <kling@serenityos.org> | 2020-03-04 09:46:23 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-03-04 14:26:16 +0100 |
commit | 0f3e57a6fb037f6a8133e8ec2be8f0889ff9bc19 (patch) | |
tree | 3fc1f6f91d7e00783792e98bd23f226e591d99a3 /MenuApplets/Clock/main.cpp | |
parent | 4697195645a4c66930761c85685f5752dc777bba (diff) | |
download | serenity-0f3e57a6fb037f6a8133e8ec2be8f0889ff9bc19.zip |
LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients
Diffstat (limited to 'MenuApplets/Clock/main.cpp')
-rw-r--r-- | MenuApplets/Clock/main.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/MenuApplets/Clock/main.cpp b/MenuApplets/Clock/main.cpp index e27f11215e..4ef3e65ec0 100644 --- a/MenuApplets/Clock/main.cpp +++ b/MenuApplets/Clock/main.cpp @@ -106,10 +106,8 @@ int main(int argc, char** argv) window->set_title("Clock"); window->set_window_type(GUI::WindowType::MenuApplet); - auto widget = ClockWidget::construct(); - - window->resize(widget->get_width(), 16); - window->set_main_widget(widget); + auto& widget = window->set_main_widget<ClockWidget>(); + window->resize(widget.get_width(), 16); window->show(); if (unveil("/res", "r") < 0) { |