mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Piano: Add an (empty) menubar so the app looks a little more complete.
This commit is contained in:
parent
e7957db173
commit
fd4ae0d25b
Notes:
sideshowbarker
2024-07-19 13:02:01 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fd4ae0d25b1
1 changed files with 14 additions and 0 deletions
|
@ -3,8 +3,11 @@
|
|||
#include <LibAudio/AClientConnection.h>
|
||||
#include <LibCore/CFile.h>
|
||||
#include <LibCore/CThread.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GEventLoop.h>
|
||||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
#include <LibGUI/GWindow.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
@ -41,5 +44,16 @@ int main(int argc, char** argv)
|
|||
},
|
||||
piano_widget);
|
||||
|
||||
auto menubar = make<GMenuBar>();
|
||||
|
||||
auto app_menu = make<GMenu>("Piano");
|
||||
app_menu->add_action(GAction::create("Quit", { Mod_Alt, Key_F4 }, [](const GAction&) {
|
||||
GApplication::the().quit(0);
|
||||
return;
|
||||
}));
|
||||
menubar->add_menu(move(app_menu));
|
||||
|
||||
app.set_menubar(move(menubar));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue