summaryrefslogtreecommitdiff
path: root/Userland/Applications/Calculator/RoundingDialog.cpp
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2022-01-16 22:45:09 +0100
committerTim Flynn <trflynn89@pm.me>2022-10-03 15:12:47 -0400
commit2ff773a6ba4b8ab81bf1f2eacc180a666a2ea204 (patch)
treef27d65c9fd62c10b57aa4d2e4384999b7f23b8c8 /Userland/Applications/Calculator/RoundingDialog.cpp
parente3b22c395d7bef1897284f88ae0bacc77a8659a9 (diff)
downloadserenity-2ff773a6ba4b8ab81bf1f2eacc180a666a2ea204.zip
Calculator: Add a Shrinking action
This action allow the user to shrink a number to a finite number of decimal.
Diffstat (limited to 'Userland/Applications/Calculator/RoundingDialog.cpp')
-rw-r--r--Userland/Applications/Calculator/RoundingDialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/Calculator/RoundingDialog.cpp b/Userland/Applications/Calculator/RoundingDialog.cpp
index b968b42cd7..4492404f06 100644
--- a/Userland/Applications/Calculator/RoundingDialog.cpp
+++ b/Userland/Applications/Calculator/RoundingDialog.cpp
@@ -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>();