From eb0ca5df0049748c7903a45de9e8a62b9c8bd65d Mon Sep 17 00:00:00 2001 From: Pedro Beirao Date: Wed, 25 Sep 2024 23:08:21 +0100 Subject: [PATCH] Display endoom as an html table. Fixes some artifacts --- src/endoom.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/endoom.cpp b/src/endoom.cpp index 2237ac0..c995818 100644 --- a/src/endoom.cpp +++ b/src/endoom.cpp @@ -30,6 +30,7 @@ void endoom::showEndoom(QString consoleOutput) QString ret; int col = 0; + ret.append(""); for (int i = 0; i < qsl.size(); i++) { @@ -47,15 +48,17 @@ void endoom::showEndoom(QString consoleOutput) if (character == " ") character = " "; - ret.append("" + character + ""); + ret.append(""); col++; if (col >= 80) { - ret.append("
"); + ret.append(""); col = 0; } } + ret.append("
" + character + "
"); + ui->endoom_textEdit->append(ret); } @@ -63,8 +66,8 @@ void endoom::on_endoom_textEdit_textChanged() { QSize size = ui->endoom_textEdit->document()->size().toSize(); - ui->endoom_textEdit->setFixedHeight( size.height() + 10); - ui->endoom_textEdit->setFixedWidth( size.width() + 10); + ui->endoom_textEdit->setFixedHeight(size.height() + 10); + ui->endoom_textEdit->setFixedWidth(size.width() + 10); setFixedSize(size); }