diff --git a/Userland/Demos/Fire/Fire.cpp b/Userland/Demos/Fire/Fire.cpp index 94fc0483061..1755bd1af1f 100644 --- a/Userland/Demos/Fire/Fire.cpp +++ b/Userland/Demos/Fire/Fire.cpp @@ -23,9 +23,12 @@ */ #include +#include #include #include #include +#include +#include #include #include #include @@ -218,6 +221,11 @@ int main(int argc, char** argv) window->set_resizable(false); window->resize(640, 400); + auto menubar = GUI::Menubar::construct(); + auto& app_menu = menubar->add_menu("File"); + app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + window->set_menubar(move(menubar)); + auto& fire = window->set_main_widget(); auto& time = fire.add(); diff --git a/Userland/Demos/LibGfxDemo/main.cpp b/Userland/Demos/LibGfxDemo/main.cpp index 653050bc670..0077855beaf 100644 --- a/Userland/Demos/LibGfxDemo/main.cpp +++ b/Userland/Demos/LibGfxDemo/main.cpp @@ -4,8 +4,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include +#include +#include #include #include #include @@ -201,6 +204,11 @@ int main(int argc, char** argv) window->set_resizable(false); window->resize(WIDTH, HEIGHT); + auto menubar = GUI::Menubar::construct(); + auto& app_menu = menubar->add_menu("File"); + app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + window->set_menubar(move(menubar)); + auto app_icon = GUI::Icon::default_icon("app-libgfx-demo"); window->set_icon(app_icon.bitmap_for_size(16)); window->set_main_widget(); diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp index 1695671479d..b21a06550e7 100644 --- a/Userland/Demos/LibGfxScaleDemo/main.cpp +++ b/Userland/Demos/LibGfxScaleDemo/main.cpp @@ -4,8 +4,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include +#include +#include #include #include #include @@ -123,6 +126,11 @@ int main(int argc, char** argv) window->set_resizable(false); window->resize(WIDTH * 2, HEIGHT * 3); + auto menubar = GUI::Menubar::construct(); + auto& app_menu = menubar->add_menu("File"); + app_menu.add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })); + window->set_menubar(move(menubar)); + auto app_icon = GUI::Icon::default_icon("app-libgfx-demo"); window->set_icon(app_icon.bitmap_for_size(16)); window->set_main_widget();