Calculator: Add Constants menu
This commit is contained in:
parent
2ef8cbe6cf
commit
8f9948ad66
Notes:
sideshowbarker
2024-07-18 01:42:47 +09:00
Author: https://github.com/musabkilic Commit: https://github.com/SerenityOS/serenity/commit/8f9948ad660 Pull-request: https://github.com/SerenityOS/serenity/pull/10686
1 changed files with 8 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue