mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Playground: Add "Help" menu with "About" action
An application with menubar that's missing an about dialog feels incomplete! :^)
This commit is contained in:
parent
5dfcecd244
commit
fb7cc4ec46
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <LibCore/File.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Application.h>
|
||||
#include <LibGUI/AutocompleteProvider.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue