diff --git a/qrtranslations/fr/qrutils_fr.ts b/qrtranslations/fr/qrutils_fr.ts index 4a1d47057a..78bf1ef8ca 100644 --- a/qrtranslations/fr/qrutils_fr.ts +++ b/qrtranslations/fr/qrutils_fr.ts @@ -442,7 +442,7 @@ qReal::ui::ConsoleDock - + Reset shell diff --git a/qrtranslations/ru/qrutils_ru.ts b/qrtranslations/ru/qrutils_ru.ts index a6d60e9ce9..d44c3ac69e 100644 --- a/qrtranslations/ru/qrutils_ru.ts +++ b/qrtranslations/ru/qrutils_ru.ts @@ -554,7 +554,7 @@ qReal::ui::ConsoleDock - + Reset shell Очистить консоль diff --git a/qrutils/widgets/consoleDock.cpp b/qrutils/widgets/consoleDock.cpp index 252123373e..a2ece1f485 100644 --- a/qrutils/widgets/consoleDock.cpp +++ b/qrutils/widgets/consoleDock.cpp @@ -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); @@ -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);