Qt: Cheats view should have a font consistent with memory view

This commit is contained in:
Jeffrey Pfau 2016-08-27 01:04:26 -07:00
parent fa36a3da81
commit 4998c667d4
2 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,6 @@
#include "LogController.h"
#include "VFileDevice.h"
#include <QFont>
#include <QSet>
extern "C" {
@ -21,6 +20,8 @@ CheatsModel::CheatsModel(mCheatDevice* device, QObject* parent)
: QAbstractItemModel(parent)
, m_device(device)
{
m_font.setFamily("Source Code Pro");
m_font.setStyleHint(QFont::Monospace);
}
QVariant CheatsModel::data(const QModelIndex& index, int role) const {
@ -36,7 +37,7 @@ QVariant CheatsModel::data(const QModelIndex& index, int role) const {
case Qt::DisplayRole:
return line;
case Qt::FontRole:
return QFont("Courier New", 13);
return m_font;
default:
return QVariant();
}

View File

@ -7,6 +7,7 @@
#define QGBA_CHEATS_MODEL
#include <QAbstractItemModel>
#include <QFont>
struct mCheatDevice;
struct mCheatSet;
@ -46,6 +47,7 @@ public slots:
private:
mCheatDevice* m_device;
QFont m_font;
};
}