diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-16 02:19:07 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-16 02:19:07 +0100 |
commit | dff00a6d2abb84a93e48ff00dda16444550d859f (patch) | |
tree | c02425c669b4b89683ba1402a710fa52a4b3b41f /gui | |
parent | c1f560d3852ea9a951ac4bb46e9ad1261ee64e37 (diff) | |
download | MultiMC-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')
-rw-r--r-- | gui/ConsoleWindow.cpp | 15 | ||||
-rw-r--r-- | gui/ConsoleWindow.ui | 5 |
2 files changed, 11 insertions, 9 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) diff --git a/gui/ConsoleWindow.ui b/gui/ConsoleWindow.ui index 62cc89ac..c2307ecc 100644 --- a/gui/ConsoleWindow.ui +++ b/gui/ConsoleWindow.ui @@ -17,11 +17,6 @@ <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QPlainTextEdit" name="text"> - <property name="font"> - <font> - <pointsize>10</pointsize> - </font> - </property> <property name="undoRedoEnabled"> <bool>false</bool> </property> |