Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9085 from Techjar/better-monospace
Qt: Use better method of getting default monospace font
  • Loading branch information
lioncash committed Sep 15, 2020
2 parents f042251 + 0759ead commit 9e3c083
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Source/Core/DolphinQt/Config/LogWidget.cpp
Expand Up @@ -119,8 +119,7 @@ void LogWidget::UpdateFont()
case 0: // Default font
break;
case 1: // Monospace font
f = QFont(QStringLiteral("Monospace"));
f.setStyleHint(QFont::TypeWriter);
f = QFont(QFontDatabase::systemFont(QFontDatabase::FixedFont).family());
break;
case 2: // Debugger font
f = Settings::Instance().GetDebugFont();
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/DolphinQt/Settings.cpp
Expand Up @@ -8,6 +8,7 @@
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QFontDatabase>
#include <QSize>

#include "AudioCommon/AudioCommon.h"
Expand Down Expand Up @@ -489,8 +490,7 @@ void Settings::SetDebugFont(QFont font)

QFont Settings::GetDebugFont() const
{
QFont default_font = QFont(QStringLiteral("Monospace"));
default_font.setStyleHint(QFont::TypeWriter);
QFont default_font = QFont(QFontDatabase::systemFont(QFontDatabase::FixedFont).family());

return GetQSettings().value(QStringLiteral("debugger/font"), default_font).value<QFont>();
}
Expand Down

0 comments on commit 9e3c083

Please sign in to comment.