1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 03:48:13 +00:00

LibGUI: Give some widgets a reasonable default fixed height

Instead of hard-coding 22 in random places, just make the following
widgets have a fixed height of 22 by default: Button, CheckBox,
ColorInput, ComboBox, RadioButton, SpinBox, TextBox.

In the future we can make this relative to the current font size,
but for now at least this centralizes the setting a bit better.
This commit is contained in:
Andreas Kling 2020-12-30 01:53:13 +01:00
parent 0f3b0b65ae
commit 1cca2405fc
17 changed files with 11 additions and 16 deletions

View file

@ -72,7 +72,6 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Gfx::Font>&& edite
glyph_width_label.set_text("Glyph width:");
auto& glyph_width_spinbox = editor_container.add<GUI::SpinBox>();
glyph_width_spinbox.set_fixed_height(22);
glyph_width_spinbox.set_min(0);
glyph_width_spinbox.set_max(32);
glyph_width_spinbox.set_value(0);
@ -253,7 +252,6 @@ FontEditorWidget::FontEditorWidget(const String& path, RefPtr<Gfx::Font>&& edite
//// Fixed checkbox Row
auto& fixed_width_checkbox = font_metadata_group_box.add<GUI::CheckBox>();
fixed_width_checkbox.set_fixed_height(22);
fixed_width_checkbox.set_text("Fixed width");
fixed_width_checkbox.set_checked(m_edited_font->is_fixed_width());