diff --git a/Libraries/LibCore/Object.h b/Libraries/LibCore/Object.h index ff513e8c57..7247ab97bd 100644 --- a/Libraries/LibCore/Object.h +++ b/Libraries/LibCore/Object.h @@ -305,4 +305,14 @@ const LogStream& operator<<(const LogStream&, const Object&); property_name, getter, setter, GUI::SizePolicy, \ { GUI::SizePolicy::Fill, "Fill" }, \ { GUI::SizePolicy::Fixed, "Fixed" }) + +#define REGISTER_TEXT_ALIGNMENT_PROPERTY(property_name, getter, setter) \ + REGISTER_ENUM_PROPERTY( \ + property_name, getter, setter, Gfx::TextAlignment, \ + { Gfx::TextAlignment::TopLeft, "TopLeft" }, \ + { Gfx::TextAlignment::CenterLeft, "CenterLeft" }, \ + { Gfx::TextAlignment::Center, "Center" }, \ + { Gfx::TextAlignment::CenterRight, "CenterRight" }, \ + { Gfx::TextAlignment::TopRight, "TopRight" }, \ + { Gfx::TextAlignment::BottomRight, "BottomRight" }) }