1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:38:11 +00:00

LibGUI: Port rest of the classes to property deserializers

This commit is contained in:
Dan Klishch 2023-11-05 19:29:02 -05:00 committed by Andrew Kaster
parent bd56d2f508
commit 1f4b15dcaa
9 changed files with 164 additions and 211 deletions

View file

@ -85,16 +85,12 @@ Window::Window(Core::EventReceiver* parent)
m_floating_rect = { -5000, -5000, 0, 0 };
m_title_when_windowless = "GUI::Window";
register_property(
"title",
[this] { return title(); },
[this](auto& value) {
set_title(value.to_byte_string());
return true;
});
REGISTER_DEPRECATED_STRING_PROPERTY("title", title, set_title)
register_property("visible", [this] { return is_visible(); });
register_property("active", [this] { return is_active(); });
register_property(
"visible"sv, [this] { return is_visible(); }, nullptr, nullptr);
register_property(
"active"sv, [this] { return is_active(); }, nullptr, nullptr);
REGISTER_BOOL_PROPERTY("minimizable", is_minimizable, set_minimizable);
REGISTER_BOOL_PROPERTY("resizable", is_resizable, set_resizable);