mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:05:10 +00:00
LibGUI: Allow specifying Layout margins and spacing in the constructor
This is comfier than `my_widget->layout()->set_margins(...)`.
This commit is contained in:
parent
ab6ef53247
commit
43dddafd16
4 changed files with 14 additions and 10 deletions
|
@ -14,7 +14,9 @@ REGISTER_ABSTRACT_CORE_OBJECT(GUI, Layout)
|
|||
|
||||
namespace GUI {
|
||||
|
||||
Layout::Layout()
|
||||
Layout::Layout(Margins initial_margins, int spacing)
|
||||
: m_margins(initial_margins)
|
||||
, m_spacing(spacing)
|
||||
{
|
||||
REGISTER_INT_PROPERTY("spacing", spacing, set_spacing);
|
||||
REGISTER_MARGINS_PROPERTY("margins", margins, set_margins);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue