1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-13 19:52:19 +00:00

More window manager hacking. Get rid of TerminalWidget for now.

This commit is contained in:
Andreas Kling 2019-01-10 05:11:07 +01:00
parent ceb373cf71
commit 077f1007eb
7 changed files with 18 additions and 34 deletions

View file

@ -102,6 +102,9 @@ void Painter::drawText(const Rect& rect, const String& text, TextAlignment align
if (alignment == TextAlignment::TopLeft) {
point = rect.location();
} else if (alignment == TextAlignment::CenterLeft) {
int textWidth = text.length() * font().glyphWidth();
point = { rect.x(), rect.center().y() - (font().glyphHeight() / 2) };
} else if (alignment == TextAlignment::Center) {
int textWidth = text.length() * font().glyphWidth();
point = rect.center();