mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
Calculator: Add a Rounding menu
This menu has three actions. Each one of them enable a different level of rounding: to 0, 2 or 4 digits.
This commit is contained in:
parent
164094e161
commit
de568f87fd
Notes:
sideshowbarker
2024-07-17 06:23:27 +09:00
Author: https://github.com/LucasChollet
Commit: de568f87fd
Pull-request: https://github.com/SerenityOS/serenity/pull/15322
Issue: https://github.com/SerenityOS/serenity/issues/14062
Reviewed-by: https://github.com/trflynn89
5 changed files with 35 additions and 5 deletions
|
@ -218,3 +218,9 @@ void CalculatorWidget::keydown_event(GUI::KeyEvent& event)
|
|||
|
||||
update_display();
|
||||
}
|
||||
|
||||
void CalculatorWidget::set_rounding_length(unsigned rounding_threshold)
|
||||
{
|
||||
m_keypad.set_rounding_length(rounding_threshold);
|
||||
update_display();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue