diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/dialogs/NotificationDialog.cpp | 1 | ||||
-rw-r--r-- | application/pages/OtherLogsPage.cpp | 19 |
2 files changed, 17 insertions, 3 deletions
diff --git a/application/dialogs/NotificationDialog.cpp b/application/dialogs/NotificationDialog.cpp index 8f920371..d61bf6bd 100644 --- a/application/dialogs/NotificationDialog.cpp +++ b/application/dialogs/NotificationDialog.cpp @@ -18,6 +18,7 @@ NotificationDialog::NotificationDialog(const NotificationChecker::NotificationEn case NotificationChecker::NotificationEntry::Warning: icon = QStyle::SP_MessageBoxWarning; break; + default: case NotificationChecker::NotificationEntry::Information: icon = QStyle::SP_MessageBoxInformation; break; diff --git a/application/pages/OtherLogsPage.cpp b/application/pages/OtherLogsPage.cpp index 31b58a24..2141e0cc 100644 --- a/application/pages/OtherLogsPage.cpp +++ b/application/pages/OtherLogsPage.cpp @@ -127,9 +127,22 @@ void OtherLogsPage::on_btnReload_clicked() } else { + auto setPlainText = [&](const QString & text) + { + QString fontFamily = MMC->settings()->get("ConsoleFont").toString(); + bool conversionOk = false; + int fontSize = MMC->settings()->get("ConsoleFontSize").toInt(&conversionOk); + if(!conversionOk) + { + fontSize = 11; + } + QTextDocument *doc = ui->text->document(); + doc->setDefaultFont(QFont(fontFamily, fontSize)); + ui->text->setPlainText(text); + }; auto showTooBig = [&]() { - ui->text->setPlainText( + setPlainText( tr("The file (%1) is too big. You may want to open it in a viewer optimized " "for large files.").arg(file.fileName())); }; @@ -144,7 +157,7 @@ void OtherLogsPage::on_btnReload_clicked() QByteArray temp; if(!GZip::unzip(file.readAll(), temp)) { - ui->text->setPlainText( + setPlainText( tr("The file (%1) is not readable.").arg(file.fileName())); return; } @@ -159,7 +172,7 @@ void OtherLogsPage::on_btnReload_clicked() showTooBig(); return; } - ui->text->setPlainText(content); + setPlainText(content); } } |