mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
Userland: Specify margins and spacing in the GUI::Layout constructor
This commit is contained in:
parent
9561ec15f4
commit
77ad0fdb07
64 changed files with 136 additions and 288 deletions
|
@ -17,16 +17,14 @@ namespace GUI {
|
|||
WizardPage::WizardPage(DeprecatedString const& title_text, DeprecatedString const& subtitle_text)
|
||||
: AbstractWizardPage()
|
||||
{
|
||||
set_layout<VerticalBoxLayout>();
|
||||
layout()->set_spacing(0);
|
||||
set_layout<VerticalBoxLayout>(GUI::Margins {}, 0);
|
||||
|
||||
auto& header_widget = add<Widget>();
|
||||
header_widget.set_fill_with_background_color(true);
|
||||
header_widget.set_background_role(Gfx::ColorRole::Base);
|
||||
header_widget.set_fixed_height(58);
|
||||
|
||||
header_widget.set_layout<VerticalBoxLayout>();
|
||||
header_widget.layout()->set_margins({ 15, 30, 0 });
|
||||
header_widget.set_layout<VerticalBoxLayout>(GUI::Margins { 15, 30, 0 });
|
||||
m_title_label = header_widget.add<Label>(title_text);
|
||||
m_title_label->set_font(Gfx::FontDatabase::default_font().bold_variant());
|
||||
m_title_label->set_fixed_height(m_title_label->font().glyph_height() + 2);
|
||||
|
@ -40,8 +38,7 @@ WizardPage::WizardPage(DeprecatedString const& title_text, DeprecatedString cons
|
|||
separator.set_fixed_height(2);
|
||||
|
||||
m_body_widget = add<Widget>();
|
||||
m_body_widget->set_layout<VerticalBoxLayout>();
|
||||
m_body_widget->layout()->set_margins(20);
|
||||
m_body_widget->set_layout<VerticalBoxLayout>(20);
|
||||
}
|
||||
|
||||
void WizardPage::set_page_title(DeprecatedString const& text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue