mirror of https://github.com/mgba-emu/mgba.git
Qt: Cheats view should have a font consistent with memory view
This commit is contained in:
parent
fa36a3da81
commit
4998c667d4
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue