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 "LogController.h"
|
||||||
#include "VFileDevice.h"
|
#include "VFileDevice.h"
|
||||||
|
|
||||||
#include <QFont>
|
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -21,6 +20,8 @@ CheatsModel::CheatsModel(mCheatDevice* device, QObject* parent)
|
||||||
: QAbstractItemModel(parent)
|
: QAbstractItemModel(parent)
|
||||||
, m_device(device)
|
, m_device(device)
|
||||||
{
|
{
|
||||||
|
m_font.setFamily("Source Code Pro");
|
||||||
|
m_font.setStyleHint(QFont::Monospace);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant CheatsModel::data(const QModelIndex& index, int role) const {
|
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:
|
case Qt::DisplayRole:
|
||||||
return line;
|
return line;
|
||||||
case Qt::FontRole:
|
case Qt::FontRole:
|
||||||
return QFont("Courier New", 13);
|
return m_font;
|
||||||
default:
|
default:
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#define QGBA_CHEATS_MODEL
|
#define QGBA_CHEATS_MODEL
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
|
#include <QFont>
|
||||||
|
|
||||||
struct mCheatDevice;
|
struct mCheatDevice;
|
||||||
struct mCheatSet;
|
struct mCheatSet;
|
||||||
|
@ -46,6 +47,7 @@ public slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mCheatDevice* m_device;
|
mCheatDevice* m_device;
|
||||||
|
QFont m_font;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue