mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-26 09:17:00 +00:00
Use monospace font in the console.
Still fugly as all hell, now in a slightly more appropriate style.
This commit is contained in:
parent
c1f560d385
commit
dff00a6d2a
@ -58,10 +58,17 @@ ConsoleWindow::~ConsoleWindow()
|
|||||||
void ConsoleWindow::writeColor(QString text, const char *color)
|
void ConsoleWindow::writeColor(QString text, const char *color)
|
||||||
{
|
{
|
||||||
// append a paragraph
|
// append a paragraph
|
||||||
if (color != nullptr)
|
QString newtext;
|
||||||
ui->text->appendHtml(QString("<font color=\"%1\">%2</font>").arg(color).arg(text));
|
newtext += "<span style=\"";
|
||||||
else
|
{
|
||||||
ui->text->appendPlainText(text);
|
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)
|
void ConsoleWindow::write(QString data, MessageLevel::Enum mode)
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="text">
|
<widget class="QPlainTextEdit" name="text">
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="undoRedoEnabled">
|
<property name="undoRedoEnabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user