1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibGUI+Userland: Switch order of parameters for InputBox::show

Because usage of the input_type parameter is now higher than of the
placeholder parameter, this makes for a cleaner API.
This commit is contained in:
Karol Baraniecki 2022-12-30 21:13:54 +01:00 committed by Andrew Kaster
parent 8095d9276b
commit 506c26acce
13 changed files with 20 additions and 20 deletions

View file

@ -15,7 +15,7 @@
namespace GUI {
InputBox::InputBox(Window* parent_window, DeprecatedString text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type)
InputBox::InputBox(Window* parent_window, DeprecatedString text_value, StringView prompt, StringView title, InputType input_type, StringView placeholder)
: Dialog(parent_window)
, m_text_value(move(text_value))
, m_prompt(prompt)
@ -25,9 +25,9 @@ InputBox::InputBox(Window* parent_window, DeprecatedString text_value, StringVie
build(input_type);
}
Dialog::ExecResult InputBox::show(Window* parent_window, DeprecatedString& text_value, StringView prompt, StringView title, StringView placeholder, InputType input_type)
Dialog::ExecResult InputBox::show(Window* parent_window, DeprecatedString& text_value, StringView prompt, StringView title, InputType input_type, StringView placeholder)
{
auto box = InputBox::construct(parent_window, text_value, prompt, title, placeholder, input_type);
auto box = InputBox::construct(parent_window, text_value, prompt, title, input_type, placeholder);
box->set_resizable(false);
if (parent_window)
box->set_icon(parent_window->icon());