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

LibGfx: Add TextAlignment::BottomRight

This commit is contained in:
Peter Elliott 2020-08-21 08:52:39 -06:00 committed by Andreas Kling
parent 23a43d10f3
commit 28db3cd5ef
3 changed files with 10 additions and 0 deletions

View file

@ -134,6 +134,10 @@ void Rect<T>::align_within(const Rect<T>& other, TextAlignment alignment)
set_x(other.x() + other.width() - width());
center_vertically_within(other);
return;
case TextAlignment::BottomRight:
set_x(other.x() + other.width() - width());
set_y(other.y() + other.height() - height());
return;
}
}