Base+Calculator: Add icons
Adds icons for Pi and Euler's Constant to the Constants menu.
This commit is contained in:
parent
9e81f60a2f
commit
adf6be45fb
Notes:
sideshowbarker
2024-07-17 18:54:00 +09:00
Author: https://github.com/electrikmilk Commit: https://github.com/SerenityOS/serenity/commit/adf6be45fb Pull-request: https://github.com/SerenityOS/serenity/pull/12494
3 changed files with 2 additions and 2 deletions
BIN
Base/res/icons/calculator/eulers.png
Normal file
BIN
Base/res/icons/calculator/eulers.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
BIN
Base/res/icons/calculator/pi.png
Normal file
BIN
Base/res/icons/calculator/pi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
|
@ -57,10 +57,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
}));
|
||||
|
||||
auto& constants_menu = window->add_menu("&Constants");
|
||||
constants_menu.add_action(GUI::Action::create("&Pi", [&](auto&) {
|
||||
constants_menu.add_action(GUI::Action::create("&Pi", TRY(Gfx::Bitmap::try_load_from_file("/res/icons/calculator/pi.png")), [&](auto&) {
|
||||
widget->set_entry(KeypadValue { 31415926535, 10 });
|
||||
}));
|
||||
constants_menu.add_action(GUI::Action::create("&Euler's Constant", [&](auto&) {
|
||||
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 });
|
||||
}));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue