mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibCore: Add REGISTER_TEXT_ALIGNMENT_PROPERTY macro
This commit is contained in:
committed by
Andreas Kling
parent
6c0fa6ad93
commit
1e70986d19
@@ -305,4 +305,14 @@ const LogStream& operator<<(const LogStream&, const Object&);
|
|||||||
property_name, getter, setter, GUI::SizePolicy, \
|
property_name, getter, setter, GUI::SizePolicy, \
|
||||||
{ GUI::SizePolicy::Fill, "Fill" }, \
|
{ GUI::SizePolicy::Fill, "Fill" }, \
|
||||||
{ GUI::SizePolicy::Fixed, "Fixed" })
|
{ 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" })
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user