summaryrefslogtreecommitdiffstats
path: root/gui/ConsoleWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-16 02:19:07 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-16 02:19:07 +0100
commitdff00a6d2abb84a93e48ff00dda16444550d859f (patch)
treec02425c669b4b89683ba1402a710fa52a4b3b41f /gui/ConsoleWindow.cpp
parentc1f560d3852ea9a951ac4bb46e9ad1261ee64e37 (diff)
downloadMultiMC-dff00a6d2abb84a93e48ff00dda16444550d859f.tar
MultiMC-dff00a6d2abb84a93e48ff00dda16444550d859f.tar.gz
MultiMC-dff00a6d2abb84a93e48ff00dda16444550d859f.tar.lz
MultiMC-dff00a6d2abb84a93e48ff00dda16444550d859f.tar.xz
MultiMC-dff00a6d2abb84a93e48ff00dda16444550d859f.zip
Use monospace font in the console.
Still fugly as all hell, now in a slightly more appropriate style.
Diffstat (limited to 'gui/ConsoleWindow.cpp')
-rw-r--r--gui/ConsoleWindow.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/gui/ConsoleWindow.cpp b/gui/ConsoleWindow.cpp
index 24afbc0a..e640d261 100644
--- a/gui/ConsoleWindow.cpp
+++ b/gui/ConsoleWindow.cpp
@@ -58,10 +58,17 @@ ConsoleWindow::~ConsoleWindow()
void ConsoleWindow::writeColor(QString text, const char *color)
{
// append a paragraph
- if (color != nullptr)
- ui->text->appendHtml(QString("<font color=\"%1\">%2</font>").arg(color).arg(text));
- else
- ui->text->appendPlainText(text);
+ QString newtext;
+ newtext += "<span style=\"";
+ {
+ if(color)
+ newtext += QString("color:") + color + ";";
+ newtext += "font-family: monospace;";
+ }
+ newtext += "\">";
+ newtext += text.toHtmlEscaped();
+ newtext += "</span>";
+ ui->text->appendHtml(newtext);
}
void ConsoleWindow::write(QString data, MessageLevel::Enum mode)