citra-qt: Add helper function to get a monospace QFont
This commit is contained in:
parent
afd45d1d7f
commit
c7745408f7
6 changed files with 32 additions and 5 deletions
|
@ -7,6 +7,8 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QDebug>
|
||||
|
||||
#include "citra_qt/util/util.h"
|
||||
|
||||
extern GraphicsDebugger g_debugger;
|
||||
|
||||
GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent) : QAbstractListModel(parent), command_count(0)
|
||||
|
@ -79,7 +81,7 @@ GPUCommandStreamWidget::GPUCommandStreamWidget(QWidget* parent) : QDockWidget(tr
|
|||
|
||||
QListView* command_list = new QListView;
|
||||
command_list->setModel(command_model);
|
||||
command_list->setFont(QFont("monospace"));
|
||||
command_list->setFont(GetMonospaceFont());
|
||||
|
||||
setWidget(command_list);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include <QSpinBox>
|
||||
#include <QComboBox>
|
||||
|
||||
#include "citra_qt/util/util.h"
|
||||
|
||||
#include "common/vector_math.h"
|
||||
|
||||
#include "video_core/debug_utils/debug_utils.h"
|
||||
|
@ -303,9 +305,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi
|
|||
|
||||
list_widget = new QTreeView;
|
||||
list_widget->setModel(model);
|
||||
QFont font("monospace");
|
||||
font.setStyleHint(QFont::Monospace); // Automatic fallback to a monospace font on on platforms without a font called "monospace"
|
||||
list_widget->setFont(font);
|
||||
list_widget->setFont(GetMonospaceFont());
|
||||
list_widget->setRootIsDecorated(false);
|
||||
list_widget->setUniformRowHeights(true);
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include <QSpinBox>
|
||||
#include <QTreeView>
|
||||
|
||||
#include "citra_qt/util/util.h"
|
||||
|
||||
#include "video_core/shader/shader.h"
|
||||
|
||||
#include "graphics_vertex_shader.h"
|
||||
|
@ -245,7 +247,7 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con
|
|||
}
|
||||
|
||||
case Qt::FontRole:
|
||||
return QFont("monospace");
|
||||
return GetMonospaceFont();
|
||||
|
||||
case Qt::BackgroundRole:
|
||||
// Highlight instructions which have no debug data associated to them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue