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

LibGfx: Add missing TextAlignment::BottomLeft

This commit is contained in:
Linus Groh 2021-05-21 01:03:02 +01:00 committed by Andreas Kling
parent 8cbdcffd05
commit 9dd3203cc6
6 changed files with 19 additions and 5 deletions

View file

@ -114,6 +114,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::BottomLeft:
set_x(other.x());
set_y(other.y() + other.height() - height());
return;
case TextAlignment::BottomRight:
set_x(other.x() + other.width() - width());
set_y(other.y() + other.height() - height());