LibGUI: Give a default min-width to a bunch of widgets

This commit is contained in:
Andreas Kling 2020-12-30 02:57:45 +01:00
parent 10b5b9ee66
commit bc5635422b
Notes: sideshowbarker 2024-07-19 00:24:51 +09:00
7 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,7 @@ namespace GUI {
Button::Button(String text)
: AbstractButton(move(text))
{
set_min_width(32);
set_fixed_height(22);
set_focus_policy(GUI::FocusPolicy::StrongFocus);
}

View File

@ -39,6 +39,7 @@ static const int s_box_height = 13;
CheckBox::CheckBox(String text)
: AbstractButton(move(text))
{
set_min_width(32);
set_fixed_height(22);
}

View File

@ -35,6 +35,7 @@ namespace GUI {
ColorInput::ColorInput()
: TextEditor(TextEditor::SingleLine)
{
set_min_width(32);
set_fixed_height(22);
TextEditor::on_change = [this] {
auto parsed_color = Color::from_string(text());

View File

@ -58,6 +58,7 @@ private:
ComboBox::ComboBox()
{
set_min_width(32);
set_fixed_height(22);
m_editor = add<ComboBoxEditor>();

View File

@ -36,6 +36,7 @@ namespace GUI {
RadioButton::RadioButton(String text)
: AbstractButton(move(text))
{
set_min_width(32);
set_fixed_height(22);
}

View File

@ -32,6 +32,7 @@ namespace GUI {
SpinBox::SpinBox()
{
set_min_width(32);
set_fixed_height(22);
m_editor = add<TextBox>();
m_editor->set_text("0");

View File

@ -31,6 +31,7 @@ namespace GUI {
TextBox::TextBox()
: TextEditor(TextEditor::SingleLine)
{
set_min_width(32);
set_fixed_height(22);
}