summaryrefslogtreecommitdiff
path: root/Applications/Piano
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-07-07 13:48:25 -0400
committerAndreas Kling <kling@serenityos.org>2020-07-07 23:11:08 +0200
commit2dd40aac4d5daa1f98a24bd85a620d9adebff71c (patch)
treefe4956ceea929148d1a90cc022212c23b5ed4386 /Applications/Piano
parent173effc88d83c2bd66c5ea5ea8b52d591fcd1faf (diff)
downloadserenity-2dd40aac4d5daa1f98a24bd85a620d9adebff71c.zip
Piano: Make menu bar consistent with other apps
"Help" should be after "Edit". The "Quit" menu item should be at the end of the app menu, and after a separator.
Diffstat (limited to 'Applications/Piano')
-rw-r--r--Applications/Piano/main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Applications/Piano/main.cpp b/Applications/Piano/main.cpp
index aec6966a81..0a9782bf37 100644
--- a/Applications/Piano/main.cpp
+++ b/Applications/Piano/main.cpp
@@ -95,10 +95,6 @@ int main(int argc, char** argv)
auto menubar = GUI::MenuBar::construct();
auto& app_menu = menubar->add_menu("Piano");
- app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
- GUI::Application::the()->quit();
- return;
- }));
app_menu.add_action(GUI::Action::create("Export", { Mod_Ctrl, Key_E }, [&](const GUI::Action&) {
save_path = GUI::FilePicker::get_save_filepath("Untitled", "wav");
if (!save_path.has_value())
@@ -111,15 +107,20 @@ int main(int argc, char** argv)
}
need_to_write_wav = true;
}));
+ app_menu.add_separator();
+ app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
+ GUI::Application::the()->quit();
+ return;
+ }));
+
+ auto& edit_menu = menubar->add_menu("Edit");
+ main_widget.add_actions(edit_menu);
auto& help_menu = menubar->add_menu("Help");
help_menu.add_action(GUI::Action::create("About", [&](const GUI::Action&) {
GUI::AboutDialog::show("Piano", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-piano.png"), window);
}));
- auto& edit_menu = menubar->add_menu("Edit");
- main_widget.add_actions(edit_menu);
-
app->set_menubar(move(menubar));
return app->exec();