From fb7cc4ec46bd1528f70b31ca6d46feaa1c7887c6 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sat, 2 Jan 2021 01:42:51 +0100 Subject: [PATCH] Playground: Add "Help" menu with "About" action An application with menubar that's missing an about dialog feels incomplete! :^) --- DevTools/Playground/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DevTools/Playground/main.cpp b/DevTools/Playground/main.cpp index fa39dbcac8..f3d3e2514c 100644 --- a/DevTools/Playground/main.cpp +++ b/DevTools/Playground/main.cpp @@ -25,6 +25,7 @@ */ #include +#include #include #include #include @@ -230,6 +231,11 @@ int main(int argc, char** argv) app->quit(); })); + auto& help_menu = menubar->add_menu("Help"); + help_menu.add_action(GUI::Action::create("About", [&](auto&) { + GUI::AboutDialog::show("GML Playground", app_icon.bitmap_for_size(32), window); + })); + app->set_menubar(move(menubar)); window->show();