mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +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
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