summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-05 01:03:37 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-05 01:37:00 +0100
commitc098a6495b283d4379fbb31e8c4b562dc2587604 (patch)
tree9532e03248a4d31b824015ac9a527cf29532d93c /Userland/Libraries/LibGUI
parent7a1a8d267db876f07bccbd819efc0a11305df243 (diff)
downloadserenity-c098a6495b283d4379fbb31e8c4b562dc2587604.zip
LibGUI: Use default Button and TextBox heights in InputBox
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/InputBox.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGUI/InputBox.cpp b/Userland/Libraries/LibGUI/InputBox.cpp
index abb39e4cbc..4096100bfb 100644
--- a/Userland/Libraries/LibGUI/InputBox.cpp
+++ b/Userland/Libraries/LibGUI/InputBox.cpp
@@ -47,7 +47,7 @@ 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, 62);
+ set_rect(x(), y(), max_width + 140, 66);
widget.set_layout<VerticalBoxLayout>();
widget.set_fill_with_background_color(true);
@@ -70,14 +70,13 @@ void InputBox::build(InputType input_type)
break;
}
- m_text_editor->set_fixed_height(19);
m_text_editor->set_text(m_text_value);
if (!m_placeholder.is_null())
m_text_editor->set_placeholder(m_placeholder);
auto& button_container_outer = widget.add<Widget>();
- button_container_outer.set_fixed_height(20);
+ button_container_outer.set_fixed_height(22);
button_container_outer.set_layout<VerticalBoxLayout>();
auto& button_container_inner = button_container_outer.add<Widget>();
@@ -87,7 +86,6 @@ void InputBox::build(InputType input_type)
button_container_inner.layout()->add_spacer();
m_ok_button = button_container_inner.add<Button>();
- m_ok_button->set_fixed_height(20);
m_ok_button->set_text("OK");
m_ok_button->on_click = [this](auto) {
dbgln("GUI::InputBox: OK button clicked");
@@ -96,7 +94,6 @@ void InputBox::build(InputType input_type)
};
m_cancel_button = button_container_inner.add<Button>();
- m_cancel_button->set_fixed_height(20);
m_cancel_button->set_text("Cancel");
m_cancel_button->on_click = [this](auto) {
dbgln("GUI::InputBox: Cancel button clicked");