Calculator: Add Phi constant

This commit is contained in:
Andrew Dykema 2022-06-09 10:12:56 -07:00 committed by Linus Groh
parent 9a07f9cdac
commit 8c37e508f2
Notes: sideshowbarker 2024-07-17 10:22:08 +09:00
2 changed files with 3 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

View file

@ -63,6 +63,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
constants_menu.add_action(GUI::Action::create("&Euler's Constant", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/calculator/eulers.png")), [&](auto&) {
widget->set_entry(KeypadValue { 27182818284, 10 });
}));
constants_menu.add_action(GUI::Action::create("&Phi", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/calculator/phi.png")), [&](auto&) {
widget->set_entry(KeypadValue { 16180339887, 10 });
}));
auto& help_menu = window->add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_about_action("Calculator", app_icon, window));