mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Applications: Implement some missing MenuBars & AboutDialogs
This commit is contained in:
parent
33b8d37dd3
commit
74a18c86c9
7 changed files with 80 additions and 7 deletions
|
@ -3,9 +3,9 @@
|
|||
#include <LibAudio/AClientConnection.h>
|
||||
#include <LibCore/CFile.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
#include <LibGUI/GAboutDialog.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
#include <LibThread/Thread.h>
|
||||
|
@ -51,6 +51,12 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
auto help_menu = GMenu::construct("Help");
|
||||
help_menu->add_action(GAction::create("About", [&](const GAction&) {
|
||||
GAboutDialog::show("Piano", load_png("/res/icons/32x32/app-piano.png"), window);
|
||||
}));
|
||||
menubar->add_menu(move(help_menu));
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
|
||||
return app.exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue