summaryrefslogtreecommitdiff
path: root/Widgets/TerminalWidget.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-11 23:14:51 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-11 23:25:07 +0200
commita6e0577f30446598bb6b20007c813da2f0387dc2 (patch)
treeb84c304d17a6ec4ac8f20f4763d3b899c9e5cb8a /Widgets/TerminalWidget.cpp
parenta4491e9630cb175ab8f0fa8cee1c224dbf4ad0e2 (diff)
downloadserenity-a6e0577f30446598bb6b20007c813da2f0387dc2.zip
Some work on window decorations.
Diffstat (limited to 'Widgets/TerminalWidget.cpp')
-rw-r--r--Widgets/TerminalWidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Widgets/TerminalWidget.cpp b/Widgets/TerminalWidget.cpp
index 0d404b3f45..ff11ac880b 100644
--- a/Widgets/TerminalWidget.cpp
+++ b/Widgets/TerminalWidget.cpp
@@ -15,7 +15,8 @@ TerminalWidget::TerminalWidget(Widget* parent)
g_tw = this;
- setRect({ 100, 300, columns() * 8, rows() * 10 });
+ setRect({ 100, 300, (columns() * 8) + 4, (rows() * 10) + 4 });
+
printf("rekt: %d x %d\n", width(), height());
m_screen = new CharacterWithAttributes[rows() * columns()];
for (unsigned row = 0; row < m_rows; ++row) {
@@ -70,7 +71,7 @@ void TerminalWidget::onPaint(PaintEvent&)
for (unsigned column = 0; column < m_columns; ++column) {
int x = column * 8;
buf[0] = at(row, column).character;
- painter.drawText({ x, y, width(), 10 }, buf, Painter::TextAlignment::TopLeft, Color(0xa0, 0xa0, 0xa0));
+ painter.drawText({ x + 2, y + 2, width(), 10 }, buf, Painter::TextAlignment::TopLeft, Color(0xa0, 0xa0, 0xa0));
}
}
}