Skip to content

Commit

Permalink
LibGUI: Give a default min-width to a bunch of widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Dec 30, 2020
1 parent 10b5b9e commit bc56354
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/LibGUI/Button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibGUI/CheckBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibGUI/ColorInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibGUI/ComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class ComboBoxEditor final : public TextEditor {

ComboBox::ComboBox()
{
set_min_width(32);
set_fixed_height(22);

m_editor = add<ComboBoxEditor>();
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibGUI/RadioButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace GUI {
RadioButton::RadioButton(String text)
: AbstractButton(move(text))
{
set_min_width(32);
set_fixed_height(22);
}

Expand Down
1 change: 1 addition & 0 deletions Libraries/LibGUI/SpinBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibGUI/TextBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace GUI {
TextBox::TextBox()
: TextEditor(TextEditor::SingleLine)
{
set_min_width(32);
set_fixed_height(22);
}

Expand Down

0 comments on commit bc56354

Please sign in to comment.