Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qrtranslations/fr/qrutils_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
<context>
<name>qReal::ui::ConsoleDock</name>
<message>
<location filename="../../qrutils/widgets/consoleDock.cpp" line="+50"/>
<location filename="../../qrutils/widgets/consoleDock.cpp" line="+54"/>
<source>Reset shell</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion qrtranslations/ru/qrutils_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@
<context>
<name>qReal::ui::ConsoleDock</name>
<message>
<location filename="../../qrutils/widgets/consoleDock.cpp" line="+50"/>
<location filename="../../qrutils/widgets/consoleDock.cpp" line="+54"/>
<source>Reset shell</source>
<translation>Очистить консоль</translation>
</message>
Expand Down
8 changes: 6 additions & 2 deletions qrutils/widgets/consoleDock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ConsoleDock::ConsoleDock(const QString &title, QWidget *parent)
: QDockWidget(title, parent)
, mOutput(new QPlainTextEdit(this))
{
QFont font("Monospace");
QFont font("");
font.setStyleHint(QFont::Monospace);
bool ok;
auto size = qReal::SettingsManager::value("CustomDockTextSize").toInt(&ok);
Expand All @@ -40,7 +40,11 @@ ConsoleDock::ConsoleDock(const QString &title, QWidget *parent)

mOutput->setFont(font);
if (!QFontInfo(mOutput->font()).fixedPitch()) {
QLOG_ERROR() << "Not monospaced font was choosen " << font.toString();
const auto &font1 = mOutput->font();
font.setStyleHint(QFont::TypeWriter);
mOutput->setFont(font);
const auto &font2 = mOutput->font();
QLOG_ERROR() << "Not monospaced font was choosen (" << font1 << "), trying to fallback to" << font2;
}
setWidget(mOutput);
mOutput->setReadOnly(false);
Expand Down
Loading