Qt: Cheats view should have a font consistent with memory view
Jeffrey Pfau jeffrey@endrift.com
Sat, 27 Aug 2016 01:04:26 -0700
2 files changed,
5 insertions(+),
2 deletions(-)
M
src/platform/qt/CheatsModel.cpp
→
src/platform/qt/CheatsModel.cpp
@@ -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 @@ switch (role) {
case Qt::DisplayRole: return line; case Qt::FontRole: - return QFont("Courier New", 13); + return m_font; default: return QVariant(); }
M
src/platform/qt/CheatsModel.h
→
src/platform/qt/CheatsModel.h
@@ -7,6 +7,7 @@ #ifndef QGBA_CHEATS_MODEL
#define QGBA_CHEATS_MODEL #include <QAbstractItemModel> +#include <QFont> struct mCheatDevice; struct mCheatSet;@@ -46,6 +47,7 @@ void invalidated();
private: mCheatDevice* m_device; + QFont m_font; }; }