summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2022-03-08 14:20:20 -0300
committerAndreas Kling <kling@serenityos.org>2022-03-08 18:34:14 +0100
commit0b3c1b4c79046125e3d38d752378ed0f221aa5b2 (patch)
treee44e81a4aa64d9d4e30b4ceadd9faea47ae290dc /Userland
parent6dd8ef485aec012f7659946c7aba2651d349befb (diff)
downloadserenity-0b3c1b4c79046125e3d38d752378ed0f221aa5b2.zip
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.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Demos/Mandelbrot/Mandelbrot.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp
index 1d06224447..4284a89467 100644
--- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp
+++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp
@@ -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));
- window->show();
+ 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)));
- auto app_icon = GUI::Icon::default_icon("app-mandelbrot");
- window->set_icon(app_icon.bitmap_for_size(16));
+ window->show();
window->set_cursor(Gfx::StandardCursor::Zoom);
-
return app->exec();
}