diff options
| author | 2015-08-19 17:00:56 -0300 | |
|---|---|---|
| committer | 2015-08-24 22:16:28 -0300 | |
| commit | c7745408f77a17771c1a26efb981d79aa66c9f66 (patch) | |
| tree | 21c29e6927d35d51a1a9becc43f004746a38e777 /src/citra_qt/debugger | |
| parent | Merge pull request #1063 from Subv/hw_renderer_debug_fb (diff) | |
| download | yuzu-c7745408f77a17771c1a26efb981d79aa66c9f66.tar.gz yuzu-c7745408f77a17771c1a26efb981d79aa66c9f66.tar.xz yuzu-c7745408f77a17771c1a26efb981d79aa66c9f66.zip | |
citra-qt: Add helper function to get a monospace QFont
Diffstat (limited to 'src/citra_qt/debugger')
| -rw-r--r-- | src/citra_qt/debugger/graphics.cpp | 4 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics_cmdlists.cpp | 6 | ||||
| -rw-r--r-- | src/citra_qt/debugger/graphics_vertex_shader.cpp | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/citra_qt/debugger/graphics.cpp b/src/citra_qt/debugger/graphics.cpp index 7424671f1..7d15028f0 100644 --- a/src/citra_qt/debugger/graphics.cpp +++ b/src/citra_qt/debugger/graphics.cpp | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #include <QVBoxLayout> | 7 | #include <QVBoxLayout> |
| 8 | #include <QDebug> | 8 | #include <QDebug> |
| 9 | 9 | ||
| 10 | #include "citra_qt/util/util.h" | ||
| 11 | |||
| 10 | extern GraphicsDebugger g_debugger; | 12 | extern GraphicsDebugger g_debugger; |
| 11 | 13 | ||
| 12 | GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent) : QAbstractListModel(parent), command_count(0) | 14 | GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent) : QAbstractListModel(parent), command_count(0) |
| @@ -79,7 +81,7 @@ GPUCommandStreamWidget::GPUCommandStreamWidget(QWidget* parent) : QDockWidget(tr | |||
| 79 | 81 | ||
| 80 | QListView* command_list = new QListView; | 82 | QListView* command_list = new QListView; |
| 81 | command_list->setModel(command_model); | 83 | command_list->setModel(command_model); |
| 82 | command_list->setFont(QFont("monospace")); | 84 | command_list->setFont(GetMonospaceFont()); |
| 83 | 85 | ||
| 84 | setWidget(command_list); | 86 | setWidget(command_list); |
| 85 | } | 87 | } |
diff --git a/src/citra_qt/debugger/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics_cmdlists.cpp index 35a3140b2..025434687 100644 --- a/src/citra_qt/debugger/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics_cmdlists.cpp | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | #include <QSpinBox> | 14 | #include <QSpinBox> |
| 15 | #include <QComboBox> | 15 | #include <QComboBox> |
| 16 | 16 | ||
| 17 | #include "citra_qt/util/util.h" | ||
| 18 | |||
| 17 | #include "common/vector_math.h" | 19 | #include "common/vector_math.h" |
| 18 | 20 | ||
| 19 | #include "video_core/debug_utils/debug_utils.h" | 21 | #include "video_core/debug_utils/debug_utils.h" |
| @@ -303,9 +305,7 @@ GPUCommandListWidget::GPUCommandListWidget(QWidget* parent) : QDockWidget(tr("Pi | |||
| 303 | 305 | ||
| 304 | list_widget = new QTreeView; | 306 | list_widget = new QTreeView; |
| 305 | list_widget->setModel(model); | 307 | list_widget->setModel(model); |
| 306 | QFont font("monospace"); | 308 | list_widget->setFont(GetMonospaceFont()); |
| 307 | font.setStyleHint(QFont::Monospace); // Automatic fallback to a monospace font on on platforms without a font called "monospace" | ||
| 308 | list_widget->setFont(font); | ||
| 309 | list_widget->setRootIsDecorated(false); | 309 | list_widget->setRootIsDecorated(false); |
| 310 | list_widget->setUniformRowHeights(true); | 310 | list_widget->setUniformRowHeights(true); |
| 311 | 311 | ||
diff --git a/src/citra_qt/debugger/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics_vertex_shader.cpp index 0c17edee0..1d9a00e89 100644 --- a/src/citra_qt/debugger/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics_vertex_shader.cpp | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #include <QSpinBox> | 15 | #include <QSpinBox> |
| 16 | #include <QTreeView> | 16 | #include <QTreeView> |
| 17 | 17 | ||
| 18 | #include "citra_qt/util/util.h" | ||
| 19 | |||
| 18 | #include "video_core/shader/shader.h" | 20 | #include "video_core/shader/shader.h" |
| 19 | 21 | ||
| 20 | #include "graphics_vertex_shader.h" | 22 | #include "graphics_vertex_shader.h" |
| @@ -245,7 +247,7 @@ QVariant GraphicsVertexShaderModel::data(const QModelIndex& index, int role) con | |||
| 245 | } | 247 | } |
| 246 | 248 | ||
| 247 | case Qt::FontRole: | 249 | case Qt::FontRole: |
| 248 | return QFont("monospace"); | 250 | return GetMonospaceFont(); |
| 249 | 251 | ||
| 250 | case Qt::BackgroundRole: | 252 | case Qt::BackgroundRole: |
| 251 | // Highlight instructions which have no debug data associated to them | 253 | // Highlight instructions which have no debug data associated to them |