mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibGUI: Port rest of the classes to property deserializers
This commit is contained in:
parent
bd56d2f508
commit
1f4b15dcaa
Notes:
sideshowbarker
2024-07-16 18:03:21 +09:00
Author: https://github.com/DanShaders
Commit: 1f4b15dcaa
Pull-request: https://github.com/SerenityOS/serenity/pull/21812
Reviewed-by: https://github.com/ADKaster ✅
9 changed files with 164 additions and 211 deletions
|
@ -21,7 +21,8 @@ Layout::Layout(Margins initial_margins, int spacing)
|
|||
REGISTER_INT_PROPERTY("spacing", spacing, set_spacing);
|
||||
REGISTER_MARGINS_PROPERTY("margins", margins, set_margins);
|
||||
|
||||
register_property("entries",
|
||||
register_property(
|
||||
"entries"sv,
|
||||
[this] {
|
||||
JsonArray entries_array;
|
||||
for (auto& entry : m_entries) {
|
||||
|
@ -37,7 +38,8 @@ Layout::Layout(Margins initial_margins, int spacing)
|
|||
entries_array.must_append(move(entry_object));
|
||||
}
|
||||
return entries_array;
|
||||
});
|
||||
},
|
||||
nullptr, nullptr);
|
||||
}
|
||||
|
||||
Layout::~Layout() = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue