1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

Calculator: Add Constants menu

This commit is contained in:
Musab Kılıç 2021-10-29 19:00:15 +03:00 committed by Andreas Kling
parent 2ef8cbe6cf
commit 8f9948ad66

View file

@ -67,6 +67,14 @@ int main(int argc, char** argv)
}
}));
auto& constants_menu = window->add_menu("&Constants");
constants_menu.add_action(GUI::Action::create("&Pi", [&](auto&) {
widget.set_entry(KeypadValue { 31415926535, 10 });
}));
constants_menu.add_action(GUI::Action::create("&Euler's Constant", [&](auto&) {
widget.set_entry(KeypadValue { 27182818284, 10 });
}));
auto& help_menu = window->add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_about_action("Calculator", app_icon, window));