LibGUI: Give a default min-width to a bunch of widgets
This commit is contained in:
parent
10b5b9ee66
commit
bc5635422b
Notes:
sideshowbarker
2024-07-19 00:24:51 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/bc5635422bb
7 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,7 @@ namespace GUI {
|
||||||
Button::Button(String text)
|
Button::Button(String text)
|
||||||
: AbstractButton(move(text))
|
: AbstractButton(move(text))
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
set_focus_policy(GUI::FocusPolicy::StrongFocus);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ static const int s_box_height = 13;
|
||||||
CheckBox::CheckBox(String text)
|
CheckBox::CheckBox(String text)
|
||||||
: AbstractButton(move(text))
|
: AbstractButton(move(text))
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ namespace GUI {
|
||||||
ColorInput::ColorInput()
|
ColorInput::ColorInput()
|
||||||
: TextEditor(TextEditor::SingleLine)
|
: TextEditor(TextEditor::SingleLine)
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
TextEditor::on_change = [this] {
|
TextEditor::on_change = [this] {
|
||||||
auto parsed_color = Color::from_string(text());
|
auto parsed_color = Color::from_string(text());
|
||||||
|
|
|
@ -58,6 +58,7 @@ private:
|
||||||
|
|
||||||
ComboBox::ComboBox()
|
ComboBox::ComboBox()
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
|
|
||||||
m_editor = add<ComboBoxEditor>();
|
m_editor = add<ComboBoxEditor>();
|
||||||
|
|
|
@ -36,6 +36,7 @@ namespace GUI {
|
||||||
RadioButton::RadioButton(String text)
|
RadioButton::RadioButton(String text)
|
||||||
: AbstractButton(move(text))
|
: AbstractButton(move(text))
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace GUI {
|
||||||
|
|
||||||
SpinBox::SpinBox()
|
SpinBox::SpinBox()
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
m_editor = add<TextBox>();
|
m_editor = add<TextBox>();
|
||||||
m_editor->set_text("0");
|
m_editor->set_text("0");
|
||||||
|
|
|
@ -31,6 +31,7 @@ namespace GUI {
|
||||||
TextBox::TextBox()
|
TextBox::TextBox()
|
||||||
: TextEditor(TextEditor::SingleLine)
|
: TextEditor(TextEditor::SingleLine)
|
||||||
{
|
{
|
||||||
|
set_min_width(32);
|
||||||
set_fixed_height(22);
|
set_fixed_height(22);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue