diff --git a/Userland/Libraries/LibGUI/InputBox.cpp b/Userland/Libraries/LibGUI/InputBox.cpp index d0363e4e181..cf30f889532 100644 --- a/Userland/Libraries/LibGUI/InputBox.cpp +++ b/Userland/Libraries/LibGUI/InputBox.cpp @@ -44,19 +44,19 @@ void InputBox::build(InputType input_type) int title_width = widget.font().width(title()) + 24 /* icon, plus a little padding -- not perfect */; int max_width = max(text_width, title_width); - set_rect(x(), y(), max_width + 140, 66); - widget.set_layout(); widget.set_fill_with_background_color(true); + widget.set_preferred_height(SpecialDimension::Fit); widget.layout()->set_margins(6); widget.layout()->set_spacing(6); auto& label_editor_container = widget.add(); label_editor_container.set_layout(); + label_editor_container.set_preferred_height(SpecialDimension::Fit); auto& label = label_editor_container.add