Merge pull request #9085 from Techjar/better-monospace
Qt: Use better method of getting default monospace font
This commit is contained in:
commit
9e3c08394a
|
@ -119,8 +119,7 @@ void LogWidget::UpdateFont()
|
||||||
case 0: // Default font
|
case 0: // Default font
|
||||||
break;
|
break;
|
||||||
case 1: // Monospace font
|
case 1: // Monospace font
|
||||||
f = QFont(QStringLiteral("Monospace"));
|
f = QFont(QFontDatabase::systemFont(QFontDatabase::FixedFont).family());
|
||||||
f.setStyleHint(QFont::TypeWriter);
|
|
||||||
break;
|
break;
|
||||||
case 2: // Debugger font
|
case 2: // Debugger font
|
||||||
f = Settings::Instance().GetDebugFont();
|
f = Settings::Instance().GetDebugFont();
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QFontDatabase>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
|
||||||
#include "AudioCommon/AudioCommon.h"
|
#include "AudioCommon/AudioCommon.h"
|
||||||
|
@ -489,8 +490,7 @@ void Settings::SetDebugFont(QFont font)
|
||||||
|
|
||||||
QFont Settings::GetDebugFont() const
|
QFont Settings::GetDebugFont() const
|
||||||
{
|
{
|
||||||
QFont default_font = QFont(QStringLiteral("Monospace"));
|
QFont default_font = QFont(QFontDatabase::systemFont(QFontDatabase::FixedFont).family());
|
||||||
default_font.setStyleHint(QFont::TypeWriter);
|
|
||||||
|
|
||||||
return GetQSettings().value(QStringLiteral("debugger/font"), default_font).value<QFont>();
|
return GetQSettings().value(QStringLiteral("debugger/font"), default_font).value<QFont>();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue