Forráskód Böngészése

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

Andreas Kling 4 éve
szülő
commit
bc5635422b

+ 1 - 0
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);
 }

+ 1 - 0
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);
 }
 

+ 1 - 0
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());

+ 1 - 0
Libraries/LibGUI/ComboBox.cpp

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

+ 1 - 0
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);
 }
 

+ 1 - 0
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");

+ 1 - 0
Libraries/LibGUI/TextBox.cpp

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