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:
parent
ceb373cf71
commit
077f1007eb
7 changed files with 18 additions and 34 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue