mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 23:42:17 +00:00
Calculator: Add a Shrinking action
This action allow the user to shrink a number to a finite number of decimal.
This commit is contained in:
parent
e3b22c395d
commit
2ff773a6ba
Notes:
sideshowbarker
2024-07-17 22:41:14 +09:00
Author: https://github.com/LucasChollet
Commit: 2ff773a6ba
Pull-request: https://github.com/SerenityOS/serenity/pull/15322
Issue: https://github.com/SerenityOS/serenity/issues/14062
Reviewed-by: https://github.com/trflynn89
7 changed files with 32 additions and 7 deletions
|
@ -11,9 +11,9 @@
|
|||
#include <LibGUI/SpinBox.h>
|
||||
#include <LibGUI/TextEditor.h>
|
||||
|
||||
RoundingDialog::ExecResult RoundingDialog::show(GUI::Window* parent_window, unsigned& rounding_value)
|
||||
RoundingDialog::ExecResult RoundingDialog::show(GUI::Window* parent_window, StringView title, unsigned& rounding_value)
|
||||
{
|
||||
auto dialog = RoundingDialog::construct(parent_window);
|
||||
auto dialog = RoundingDialog::construct(parent_window, title);
|
||||
|
||||
if (parent_window) {
|
||||
dialog->set_icon(parent_window->icon());
|
||||
|
@ -32,12 +32,12 @@ RoundingDialog::ExecResult RoundingDialog::show(GUI::Window* parent_window, unsi
|
|||
return GUI::Dialog::ExecResult::OK;
|
||||
}
|
||||
|
||||
RoundingDialog::RoundingDialog(GUI::Window* parent_window)
|
||||
RoundingDialog::RoundingDialog(GUI::Window* parent_window, StringView title)
|
||||
: Dialog(parent_window)
|
||||
{
|
||||
resize(m_dialog_length, m_dialog_height);
|
||||
set_resizable(false);
|
||||
set_title("Choose custom rounding");
|
||||
set_title(title);
|
||||
|
||||
auto& main_widget = set_main_widget<GUI::Widget>();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue