diff options
author | Andreas Kling <kling@serenityos.org> | 2020-12-30 02:57:45 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-30 02:57:45 +0100 |
commit | bc5635422bb8199a8ee6b8ca6fb3f57f322c5124 (patch) | |
tree | fbc1bdcf0d9f6e39158ec6503da53d350effa57e /Libraries | |
parent | 10b5b9ee6683bba945cf89c203608a5a33c04bf8 (diff) | |
download | serenity-bc5635422bb8199a8ee6b8ca6fb3f57f322c5124.zip |
LibGUI: Give a default min-width to a bunch of widgets
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibGUI/Button.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/CheckBox.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/ColorInput.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/ComboBox.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/RadioButton.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/SpinBox.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/TextBox.cpp | 1 |
7 files changed, 7 insertions, 0 deletions
diff --git a/Libraries/LibGUI/Button.cpp b/Libraries/LibGUI/Button.cpp index 670e481c85..25c27fb502 100644 --- a/Libraries/LibGUI/Button.cpp +++ b/Libraries/LibGUI/Button.cpp @@ -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); } diff --git a/Libraries/LibGUI/CheckBox.cpp b/Libraries/LibGUI/CheckBox.cpp index ae14f1ca90..c2329d5abe 100644 --- a/Libraries/LibGUI/CheckBox.cpp +++ b/Libraries/LibGUI/CheckBox.cpp @@ -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); } diff --git a/Libraries/LibGUI/ColorInput.cpp b/Libraries/LibGUI/ColorInput.cpp index 76a93ee089..6ce7a63712 100644 --- a/Libraries/LibGUI/ColorInput.cpp +++ b/Libraries/LibGUI/ColorInput.cpp @@ -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()); diff --git a/Libraries/LibGUI/ComboBox.cpp b/Libraries/LibGUI/ComboBox.cpp index 0c07cfc57c..490fe0dea7 100644 --- a/Libraries/LibGUI/ComboBox.cpp +++ b/Libraries/LibGUI/ComboBox.cpp @@ -58,6 +58,7 @@ private: ComboBox::ComboBox() { + set_min_width(32); set_fixed_height(22); m_editor = add<ComboBoxEditor>(); diff --git a/Libraries/LibGUI/RadioButton.cpp b/Libraries/LibGUI/RadioButton.cpp index 7a854a3530..a6bb9c636a 100644 --- a/Libraries/LibGUI/RadioButton.cpp +++ b/Libraries/LibGUI/RadioButton.cpp @@ -36,6 +36,7 @@ namespace GUI { RadioButton::RadioButton(String text) : AbstractButton(move(text)) { + set_min_width(32); set_fixed_height(22); } diff --git a/Libraries/LibGUI/SpinBox.cpp b/Libraries/LibGUI/SpinBox.cpp index 390d2c7011..a8349bf2a2 100644 --- a/Libraries/LibGUI/SpinBox.cpp +++ b/Libraries/LibGUI/SpinBox.cpp @@ -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"); diff --git a/Libraries/LibGUI/TextBox.cpp b/Libraries/LibGUI/TextBox.cpp index 4dcede826a..dd9743bb42 100644 --- a/Libraries/LibGUI/TextBox.cpp +++ b/Libraries/LibGUI/TextBox.cpp @@ -31,6 +31,7 @@ namespace GUI { TextBox::TextBox() : TextEditor(TextEditor::SingleLine) { + set_min_width(32); set_fixed_height(22); } |