1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibDraw: Add TextAlignment::TopRight

Also tidy up the alignment code to use switch statements.
This commit is contained in:
Andreas Kling 2019-09-06 19:23:36 +02:00
parent cb62890f8e
commit a791b86afa
3 changed files with 33 additions and 15 deletions

View file

@ -4,13 +4,15 @@ enum class TextAlignment {
TopLeft,
CenterLeft,
Center,
CenterRight
CenterRight,
TopRight,
};
inline bool is_right_text_alignment(TextAlignment alignment)
{
switch (alignment) {
case TextAlignment::CenterRight:
case TextAlignment::TopRight:
return true;
default:
return false;