1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:27:35 +00:00

Mandelbrot: Add Help menu with standard About action

Noticed that Mandelbrot didn't use the standard About action in the Help
menu. As a first patch to Serenity, this patch fixes it.
This commit is contained in:
Paulo Henrique Silva 2022-03-08 14:20:20 -03:00 committed by Andreas Kling
parent 6dd8ef485a
commit 0b3c1b4c79

View file

@ -421,16 +421,18 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
},
window);
auto app_icon = GUI::Icon::default_icon("app-mandelbrot");
window->set_icon(app_icon.bitmap_for_size(16));
auto view_menu = TRY(window->try_add_menu("&View"));
TRY(view_menu->try_add_action(zoom_in_action));
TRY(view_menu->try_add_action(reset_zoom_action));
TRY(view_menu->try_add_action(zoom_out_action));
auto help_menu = TRY(window->try_add_menu("&Help"));
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Mandelbrot Demo", app_icon, window)));
window->show();
auto app_icon = GUI::Icon::default_icon("app-mandelbrot");
window->set_icon(app_icon.bitmap_for_size(16));
window->set_cursor(Gfx::StandardCursor::Zoom);
return app->exec();
}