diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2013-12-16 21:17:50 +0100 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2013-12-16 21:17:50 +0100 |
commit | 47bf7fff27665496bc4212bcaccc80350f665f97 (patch) | |
tree | 878fd220464c5280fcbe589d3ed738ce0306ab2a /gui/ConsoleWindow.cpp | |
parent | ae68adc3a536525990b0668703fd74eded8ccfde (diff) | |
parent | dff00a6d2abb84a93e48ff00dda16444550d859f (diff) | |
download | PrismLauncher-47bf7fff27665496bc4212bcaccc80350f665f97.tar.gz PrismLauncher-47bf7fff27665496bc4212bcaccc80350f665f97.tar.bz2 PrismLauncher-47bf7fff27665496bc4212bcaccc80350f665f97.zip |
Merge remote-tracking branch 'upstream/develop' into updater_tests
Conflicts:
mmc_updater/src/tests/CMakeLists.txt
Diffstat (limited to 'gui/ConsoleWindow.cpp')
-rw-r--r-- | gui/ConsoleWindow.cpp | 15 |
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) |